Questions tagged [pygal]

A python SVG Charts Creator

pygal is a dynamic SVG charting library.

It features various graph types:

  • Bar charts;
  • Line charts;
  • XY charts;
  • Pie charts;
  • Radar charts;
  • Dot charts;
  • Pyramid charts;
  • Funnel charts;
  • Gauge charts;
176 questions
2
votes
1 answer

Cannot import COUNTRIES module from pygal_maps_world

I know that there are similar questions but the answers are outdated and non-working by now (answers are all circa 2016). I have installed pygal_maps_world using pip but when I want to import a module it just shows me an error message. Code: from…
DjoleRkc
  • 135
  • 7
2
votes
1 answer

Python pygal SolidGauge chart remove text

I'm following the pygal docs and using the following snippet to generate a SolidGauge Half chart: http://www.pygal.org/en/stable/documentation/types/solidgauge.html#half import pygal gauge = pygal.SolidGauge( half_pie=True, …
atm
  • 1,684
  • 1
  • 22
  • 24
2
votes
2 answers

How to use min scale python pygal

So i want integer intervals between my y axis variables in my pygal graph. Here is my code: graph = pygal.Line(min_scale=1,x_label_rotation=35, truncate_label=-1, no_data_text="", style=custom_style, width=1000, height=400, explicit_size=True) …
Arjun
  • 358
  • 5
  • 14
2
votes
0 answers

How to plot pandas grouped values using pygal?

I have a csv like this: name,version,color AA,"version 1",yellow BB,"version 2",black CC,"version 3",yellow DD,"version 1",black AA,"version 1",green BB,"version 2",green FF,"version 3",green GG,"version 3",red BB,"version 3",yellow BB,"version…
mmBs
  • 8,421
  • 6
  • 38
  • 46
2
votes
1 answer

After updating Python 2.7 to Python 3, Sublime won't recognize previously imported modules

System information: Sublime Text 3.1.1 and Mac 10.14 Mojave I am very new to programming and am just following a book to learn Python. I just updated from python 2.7 to python 3. Now, Sublime will not recognize modules I previously imported and…
Sam
  • 81
  • 4
2
votes
1 answer

How to set specific color for each category when using "pygal.maps.world" drawing world map?

Does anyone use pygal.maps.world in pygal to draw a world map? I have 5 different categories that includes several countries for each category. How can I set specific color for each category? Below are part of my code: supra =…
Lei Duan
  • 33
  • 6
2
votes
1 answer

pygal: labels on multiseries pie

How do I add labels on the secondary series of a multiseries pie chart?
Mierzen
  • 566
  • 1
  • 5
  • 25
2
votes
1 answer

Plot Count of Pandas Dataframe with Start_Date and End_Date

I am trying to plot a daily follower count for various twitter handles. The result being something like what you see below, but filterable by more than 1 twitter handle: Usually, I would do this by simply appending a new dataset pulled from Twitter…
Matt M
  • 309
  • 4
  • 16
2
votes
1 answer

Tooltip issue with Pygal svg chart included in Django template

I have the following include in a django html template file: {% include 'categories_chart.svg' %} However when a request is made and the page displayed, the tooltip on mouse hover has incomplete information - it only displays the value but not the…
user2390206
  • 123
  • 1
  • 9
2
votes
1 answer

svg rendering in Qt (with pygal charts)

I am trying to render styled pygal charts using Qt SVG renderer. But I still problems with background colors because it is black. Shouldn't it be controlled by the style of pygal chart? It should look like the first chart in…
2
votes
0 answers

Pygal - Click bar and post data?

I am trying to create a simple charting web app using pygal and flask to chart some financial data I have stored in a mysql database. The data in the DB is hierarchical, and I want the app to start at the top of the hierarchy and allow the user to…
user3246693
  • 679
  • 11
  • 22
2
votes
0 answers

TypeError: bad operand type for abs(): 'datetime.datetime' when rendering using pygal

I have a very simple code that should draw an XY chart using pygal library, firstly, the code: @app.route('/graph2/',methods=["GET","POST"]) def graph2(): graph = pygal.XY() f=[('f20', 2868, datetime(2016, 5, 1, 6, 54, 46)),('f21', 2887,…
Ahmed Al-haddad
  • 805
  • 2
  • 16
  • 41
2
votes
1 answer

Properly formatting numbers in pygal

I'm using Pygal (with Python / Flask) relatively successfully in regards to loading data, formatting colors, min/max, etc., but can't figure out how to format a number in Pygal using dollar signs and commas. I'm getting 265763.557372895 and…
elPastor
  • 8,435
  • 11
  • 53
  • 81
2
votes
1 answer

How to make Horizontal Bar in pygal with labels on y?

Something like this, but without legend and with labels on y.
Port
  • 86
  • 12
1
vote
0 answers

pygal: How do I specify a different stroke width for different lines?

I would like to have different line thickness for the different lines. I tried specifying width using the stroke_style but it does not seem to help. import pygal chart = pygal.XY() chart.add(**{'title': 'Line A', 'values': [(1, 1), (10,…
tikka
  • 493
  • 1
  • 4
  • 17
1 2
3
11 12