From 23c729afa808abf4d6cded0b2446ccb4b215b90a Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Wed, 14 Mar 2012 17:19:08 +0100 Subject: [PATCH] Add the beginning of the documentation --- configuration.yaml | 2 ++ pages/documentation.rst | 15 +++++++++++++++ pages/first_steps.rst | 25 +++++++++++++++++++++++++ pages/home.rst | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 pages/documentation.rst create mode 100644 pages/first_steps.rst diff --git a/configuration.yaml b/configuration.yaml index b1a39f0..19663da 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -5,6 +5,8 @@ public: true url: http://www.pygal.org/ menu: + - Documentation: + link: /documentation/ - Contribute: link: /contribute/ - Download: diff --git a/pages/documentation.rst b/pages/documentation.rst new file mode 100644 index 0000000..a3090a1 --- /dev/null +++ b/pages/documentation.rst @@ -0,0 +1,15 @@ +=============== + Documentation +=============== + + +User documentation +================== + +- `First steps `_ + + +Developper documentation +======================== + +*TODO* diff --git a/pages/first_steps.rst b/pages/first_steps.rst new file mode 100644 index 0000000..13890d8 --- /dev/null +++ b/pages/first_steps.rst @@ -0,0 +1,25 @@ +=============== + Documentation +=============== + + +First steps +=========== + +First you need to download the pygal package, see the `download page `_. + +When it's done, you are ready to make your first chart: + +.. code-block:: python + + import pygal # First import pygal + bar_chart = pygal.Bar() # Then create a bar graph object + bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) # Add some values + bar_chart.render_to_file('bar_chart.svg') # Save the svg to a file + +Now you have a svg file called `bar_chart.svg` in your current directory. + +You can open it with various programs such as your web browser, inkscape or any svg compatible viewer. + + + diff --git a/pages/home.rst b/pages/home.rst index e206c47..42a84f2 100644 --- a/pages/home.rst +++ b/pages/home.rst @@ -27,6 +27,9 @@ And a lot of options to customize the charts. Technical Description ===================== +As of now pygal is known to work for python 2.7 + + Needed dependencies -------------------