|
|
@ -22,16 +22,26 @@ Sparklines support the same options as normal charts but for those that are over |
|
|
|
.. pygal-code:: sparkline |
|
|
|
.. pygal-code:: sparkline |
|
|
|
|
|
|
|
|
|
|
|
chart = pygal.Line(interpolate='cubic') |
|
|
|
chart = pygal.Line(interpolate='cubic') |
|
|
|
chart.add('', [1, 3, 5, 16, 13, 3, 7]) |
|
|
|
chart.add('', [1, 3, 5, 16, 13, 3, 7]) |
|
|
|
chart.render_sparkline() |
|
|
|
chart.render_sparkline() |
|
|
|
|
|
|
|
|
|
|
|
.. pygal-code:: sparkline |
|
|
|
.. pygal-code:: sparkline |
|
|
|
|
|
|
|
|
|
|
|
from pygal.style import LightSolarizedStyle |
|
|
|
from pygal.style import LightSolarizedStyle |
|
|
|
chart = pygal.Line(style=LightSolarizedStyle) |
|
|
|
chart = pygal.Line(style=LightSolarizedStyle) |
|
|
|
chart.add('', [1, 3, 5, 16, 13, 3, 7, 9, 2, 1, 4, 9, 12, 10, 12, 16, 14, 12, 7, 2]) |
|
|
|
chart.add('', [1, 3, 5, 16, 13, 3, 7, 9, 2, 1, 4, 9, 12, 10, 12, 16, 14, 12, 7, 2]) |
|
|
|
chart.render_sparkline(width=500, height=25, show_dots=True) |
|
|
|
chart.render_sparkline(width=500, height=25, show_dots=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With labels: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. pygal-code:: sparkline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from pygal.style import LightSolarizedStyle |
|
|
|
|
|
|
|
chart = pygal.Line(style=LightSolarizedStyle) |
|
|
|
|
|
|
|
chart.add('', [1, 3, 5, 16, 13, 3, 7]) |
|
|
|
|
|
|
|
chart.x_labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] |
|
|
|
|
|
|
|
chart.render_sparkline(show_x_labels=True, show_y_labels=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sparktext |
|
|
|
Sparktext |
|
|
|
--------- |
|
|
|
--------- |
|
|
|