|
|
@ -17,19 +17,6 @@ Basic simple line graph: |
|
|
|
line_chart.add('Others', [14.2, 15.4, 15.3, 8.9, 9, 10.4, 8.9, 5.8, 6.7, 6.8, 7.5]) |
|
|
|
line_chart.add('Others', [14.2, 15.4, 15.3, 8.9, 9, 10.4, 8.9, 5.8, 6.7, 6.8, 7.5]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Interruptions |
|
|
|
|
|
|
|
^^^^^^^^^^^^^ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If you happen to want a break in the middle of a plot, you can pass None values. Additionally, |
|
|
|
|
|
|
|
you will need to specify allow_interruptions=True in the constructor, in order for the behaviour |
|
|
|
|
|
|
|
to be supported correctly |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. pygal-code:: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interrupted_chart = pygal.Line(allow_interruptions=True) |
|
|
|
|
|
|
|
interrupted_chart.add('Temperature', [22, 34, 43, 12, None, 12, 55, None, 56]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stacked |
|
|
|
Stacked |
|
|
|
~~~~~~~ |
|
|
|
~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
@ -61,3 +48,9 @@ For time related plots, just format your labels or use `one variant of xy charts |
|
|
|
datetime(2013, 2, 2), |
|
|
|
datetime(2013, 2, 2), |
|
|
|
datetime(2013, 2, 22)]) |
|
|
|
datetime(2013, 2, 22)]) |
|
|
|
date_chart.add("Visits", [300, 412, 823, 672]) |
|
|
|
date_chart.add("Visits", [300, 412, 823, 672]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None values |
|
|
|
|
|
|
|
~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None values will be skipped. It is also possible to `break lines <../configuration/serie.html#allow-interruptions>`_. |
|
|
|