Browse Source

Update documentation

pull/333/head
Florian Mounier 9 years ago
parent
commit
969ab5f96f
  1. 4
      docs/documentation/configuration/serie.rst
  2. 8
      docs/documentation/first_steps.rst
  3. 2
      docs/index.rst

4
docs/documentation/configuration/serie.rst

@ -4,12 +4,12 @@ Serie configuration
How How
--- ---
Series are customized using keyword args set in the ``add`` function: Series are customized using keyword args set in the ``add`` or call function:
.. code-block:: python .. code-block:: python
chart = pygal.Line() chart = pygal.Line()
chart.add('', [1, 2, 3], fill=True) chart(1, 2, 3, fill=True)
chart.add('', [3, 2, 1], dot=False) chart.add('', [3, 2, 1], dot=False)

8
docs/documentation/first_steps.rst

@ -68,3 +68,11 @@ And finally add a title and some labels:
bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55])
bar_chart.add('Padovan', [1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12]) bar_chart.add('Padovan', [1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12])
The public API is chainable and can be simplified as call arguments, the last chart can be also written:
.. code-block:: python
bar_chart = pygal.HorizontalStackedBar(
title="Remarquable sequences", x_labels=map(str, range(11))(
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, title='Fibonacci')(
1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, title='Padovan')

2
docs/index.rst

@ -40,7 +40,7 @@ Simple python charting
.. pygal-code:: inline .. pygal-code:: inline
pygal.Bar().add('1', [1, 3, 3, 7]).add('2', [1, 6, 6, 4]).render() pygal.Bar()(1, 3, 3, 7)(1, 6, 6, 4).render()
Index Index

Loading…
Cancel
Save