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
3
votes
0 answers

legend location and scale value font size pygal python

I'm using pygal to create half-pie SVG graph in python. How can I move the legends from left to below/above the half-pie? (like the picture). How can I change the font size of the scale value? (mark in red)
oshribr
  • 658
  • 7
  • 16
3
votes
2 answers

Center-align title in Pygal chart

I'm making a line chart in Pygal. I want to center the title of the chart, but I don't know how to do that. I tried looking through the Pygal documentation, but I couldn't find anything relating to the alignment of a title. Here's what I…
neil_h_sw
  • 75
  • 4
3
votes
2 answers

chart.render_to_file('python_repos.svg')AttributeError: 'NoneType' object has no attribute 'decode'

I'm learning python with the book: "Python Crash Course: A Hands-On, Project-Based Introduction to Programming". In chapter 17 of the book "Working with APIs", I did as the book says, but an error is occurring. I don't know what the error means.…
Alina
  • 31
  • 3
3
votes
1 answer

Can't set the width and height in a pygal line graph

I'm using flask and pygal to make a website. In order to draw a graph I've put this in my webpage:
sliders_alpha
  • 2,276
  • 4
  • 33
  • 52
3
votes
2 answers

Pygal SolidGuage - Changing Label Font Size

I'm using Pygal's SolidGuage chart to display a value between two ranges. See the link below for an image of the chart. Pygal Chart Example I'm trying to make the font size for the labels (0 & 12%) larger. Does anyone know how I can do this? I can't…
ashap
  • 101
  • 1
  • 11
3
votes
1 answer

How do I adjust tooltip in Pygal?

I tried to produce a bar chart that visualizes the most-starred projects on GitHub. I added 'label' and 'xlink' inside tooltips, however, 'label' contents are not very well fit in for some items, also, some links are not shown up in certain…
Nicholas
  • 2,560
  • 2
  • 31
  • 58
3
votes
2 answers

pygal charts not displaying tooltips in Jupyter / IPython notebook

After much research, I finally managed to get tooltips working in pygal thus: Config = pygal.Config() Config.js = ['http://kozea.github.io/pygal.js/2.0.x/pygal-tooltips.js'] bar_chart = pygal.Bar(Config) # Then…
Pyderman
  • 14,809
  • 13
  • 61
  • 106
3
votes
5 answers

Tooltips are not working in my pygal bar graph?

Following my python book, I made a bar graph using pygal. I rendered the information to an .svg file and opened it up in my web browser. My book says that the plot is interactive and will show you the value of each bar if you hover over it. However,…
RandomCoder
  • 2,071
  • 4
  • 12
  • 17
3
votes
2 answers

How to change stroke color in pygal?

How to set one to red and second to blue? import pygal chart = pygal.Line() chart.x_labels = range(5) chart.add('one', [1, None, 3, None, 5]) chart.add('two', range(5)) chart.render_to_png(__file__ + '-linear.png')
Chameleon
  • 9,722
  • 16
  • 65
  • 127
3
votes
1 answer

Create PyGal graph from pandas dataframe

I wanted to try using pygal with it's ability to create SVG data as i'm going to create a printed PDF page from the merged HTML with the SVG graph. What i want to do is the equivalent of pygal.plot(dataframe) but i'm not seeing that in the docs. I…
cryptoref
  • 413
  • 1
  • 7
  • 17
3
votes
1 answer

Render pygal charts without borders

I am looking for the way of rendering charts without borders using pygal. I have no found anything useful in the documentation. However, I have identified a very strange situation looking the examples. Lets see: In this example, you can see that…
Luis González
  • 3,199
  • 26
  • 43
3
votes
2 answers

How to change stroke width in Pygal

In Pygal, is there a way to change the stroke width (make it thicker for example)? I didn't find anything related to that in the docs.
Tzach
  • 12,889
  • 11
  • 68
  • 115
3
votes
2 answers

How to limit the width/height of svg in pygal

How do I limit the width/height of a pygal generated SVG? I'm currently doing it via img tags, but is there a better way?
Brongadier
  • 159
  • 1
  • 12
3
votes
2 answers

How to make pygal distribute legend into n columns or truncate correctly?

I have a following code for pygal graph generation: import pygal from pygal.style import Style style = Style( background='white', plot_background='rgba(0, 0, 255, 0.03)', foreground='rgba(0, 0, 0, 0.8)', …
Patryk
  • 22,602
  • 44
  • 128
  • 244
2
votes
0 answers

How can i embed a pygal chart in tkinter?

i am working with pygal currently, and i want to embed pygal's chart in a tkinter gui is it possible?. code i found for the pygal chart: line_chart = pygal.Line() line_chart.title = 'Browser usage evolution (in %)' line_chart.x_labels = map(str,…
Capt.Pyrite
  • 851
  • 7
  • 24
1
2
3
11 12