Kozea / pygal

PYthon svg GrAph plotting Library
https://www.pygal.org
GNU Lesser General Public License v3.0
2.64k stars 411 forks source link

graph is surrounded by b'\n #461

Open Migacz85 opened 5 years ago

Migacz85 commented 5 years ago

I'm using Django 2.15 while running this code:

image and calling it in template: by running {{ feature_chart|safe}}

I have this errror: (graph is adding unwanted string b'\n) image

Some ideas how to solve this issue? Thank you

Migacz85 commented 5 years ago

As an addition feature_chart is calling FeaturePieChart()

cvalderramaawninc commented 5 years ago

Any solution to this? When i render() I receive the same issue, when I render_data_ui() I get this issue (see attached image). Is there any fixes for either? I want to use these charts on my site but none are working unless I make a file but I want it to interactive.

image

paradoxxxzero commented 5 years ago

I tried generating charts with render_data_uri, if you paste the output in your url bar it still works fine.

Where does the \n comes from? Is it django |safe function that adds it?

Masuchotabe commented 1 year ago

Have the same problem few years later.. Did you find anything ?