If you are using reStructuredText and install pygal, Nikola has support for rather nice charts
with little effort, and i's even semi-interactive (hover your pointer over the legend!):
.. chart :: StackedLine
:title: 'Browser usage evolution (in %)'
:fill: True
:x_labels: ['2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012']
:width: 600
:height: 400
:explicit_size: True
:style: BlueStyle
('Others', [14.2, 15.4, 15.3, 8.9, 9, 10.4, 8.9, 5.8, 6.7, 6.8, 7.5])
('IE', [85.8, 84.6, 84.7, 74.5, 66, 58.6, 54.7, 44.8, 36.2, 26.6, 20.1])
('Firefox', [None, None, None, 16.6, 25, 31, 36.4, 45.5, 46.3, 42.8, 37.1])
('Chrome', [None, None, None, None, None, None, 0, 3.9, 10.8, 23.8, 35.3])
Browser usage evolution (in %)
10 10 20 20 30 30 40 40 50 50 60 60 70 70 80 80 90 90 100 100 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 Browser usage evolution (in %) 14.2 8.676923076923076 281.03846153846155 2002 15.4 52.06153846153847 277.1923076923077 2003 15.3 95.44615384615383 277.5128205128205 2004 8.9 138.83076923076922 298.025641025641 2005 9 182.21538461538464 297.7051282051282 2006 10.4 225.6 293.21794871794873 2007 8.9 268.9846153846153 298.025641025641 2008 5.8 312.36923076923074 307.96153846153845 2009 6.7 355.75384615384615 305.0769230769231 2010 6.8 399.1384615384615 304.7564102564103 2011 7.5 442.52307692307687 302.5128205128205 2012 100 (+85.8) 8.676923076923076 6.038461538461547 2002 100 (+84.6) 52.06153846153847 6.038461538461547 2003 100 (+84.7) 95.44615384615383 6.038461538461547 2004 83.4 (+74.5) 138.83076923076922 59.24358974358972 2005 75 (+66) 182.21538461538464 86.16666666666669 2006 69 (+58.6) 225.6 105.39743589743591 2007 63.6 (+54.7) 268.9846153846153 122.7051282051282 2008 50.6 (+44.8) 312.36923076923074 164.3717948717949 2009 42.9 (+36.2) 355.75384615384615 189.05128205128204 2010 33.4 (+26.6) 399.1384615384615 219.5 2011 27.6 (+20.1) 442.52307692307687 238.0897435897436 2012 100 (+0) 8.676923076923076 6.038461538461547 2002 100 (+0) 52.06153846153847 6.038461538461547 2003 100 (+0) 95.44615384615383 6.038461538461547 2004 100 (+16.6) 138.83076923076922 6.038461538461547 2005 100 (+25) 182.21538461538464 6.038461538461547 2006 100 (+31) 225.6 6.038461538461547 2007 100 (+36.4) 268.9846153846153 6.038461538461547 2008 96.1 (+45.5) 312.36923076923074 18.538461538461547 2009 89.2 (+46.3) 355.75384615384615 40.65384615384613 2010 76.2 (+42.8) 399.1384615384615 82.32051282051287 2011 64.7 (+37.1) 442.52307692307687 119.17948717948715 2012 100 (+0) 8.676923076923076 6.038461538461547 2002 100 (+0) 52.06153846153847 6.038461538461547 2003 100 (+0) 95.44615384615383 6.038461538461547 2004 100 (+0) 138.83076923076922 6.038461538461547 2005 100 (+0) 182.21538461538464 6.038461538461547 2006 100 (+0) 225.6 6.038461538461547 2007 100 (+0) 268.9846153846153 6.038461538461547 2008 100 (+3.9) 312.36923076923074 6.038461538461547 2009 100 (+10.8) 355.75384615384615 6.038461538461547 2010 100 (+23.8) 399.1384615384615 6.038461538461604 2011 100 (+35.3) 442.52307692307687 6.038461538461547 2012 Others IE Firefox Chrome
Here's how it works:
Next to the directive, use the chart type you want
Any option you can set in a chart? Use it like :title:
in this example. Syntax on
the value is just like in the pygal examples.
For each data series do it like the line that says Firefox
in this example. The first element
is the label, then comes the data.
Easy, right? Please explore the pygal site for more information, and just
take this example and tweak stuff.
Comments
Comments powered by Disqus