-
-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation for chart examples.
- Loading branch information
Showing
53 changed files
with
372 additions
and
40 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Chart Examples | ||
============== | ||
|
||
The following are some of the examples included in the | ||
`examples <https://github.com/jmcnamara/XlsxWriter/tree/master/examples>`_ | ||
directory of the XlsxWriter distribution. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
example_chart_simple.rst | ||
example_chart_area.rst | ||
example_chart_bar.rst | ||
example_chart_column.rst | ||
example_chart_line.rst | ||
example_chart_pie.rst | ||
example_chart_scatter.rst | ||
example_chart_radar.rst | ||
example_chart_stock.rst | ||
example_chart_secondary_axis.rst | ||
example_chart_data_table.rst | ||
example_chart_data_tools.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _ex_chart_area: | ||
|
||
Example: Area Chart | ||
=================== | ||
|
||
Example of creating Excel Area charts. | ||
|
||
Chart 1 in the following example is a default area chart: | ||
|
||
.. image:: _static/chart_area1.png | ||
:scale: 75 % | ||
|
||
Chart 2 is a stacked area chart: | ||
|
||
.. image:: _static/chart_area2.png | ||
:scale: 75 % | ||
|
||
Chart 3 is a percentage stacked area chart: | ||
|
||
.. image:: _static/chart_area3.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_area.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _ex_chart_bar: | ||
|
||
Example: Bar Chart | ||
================== | ||
|
||
Example of creating Excel Bar charts. | ||
|
||
Chart 1 in the following example is a default bar chart: | ||
|
||
.. image:: _static/chart_bar1.png | ||
:scale: 75 % | ||
|
||
Chart 2 is a stacked bar chart: | ||
|
||
.. image:: _static/chart_bar2.png | ||
:scale: 75 % | ||
|
||
Chart 3 is a percentage stacked bar chart: | ||
|
||
.. image:: _static/chart_bar3.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_bar.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _ex_chart_column: | ||
|
||
Example: Column Chart | ||
===================== | ||
|
||
Example of creating Excel Column charts. | ||
|
||
Chart 1 in the following example is a default column chart: | ||
|
||
.. image:: _static/chart_column1.png | ||
:scale: 75 % | ||
|
||
Chart 2 is a stacked column chart: | ||
|
||
.. image:: _static/chart_column2.png | ||
:scale: 75 % | ||
|
||
Chart 3 is a percentage stacked column chart: | ||
|
||
.. image:: _static/chart_column3.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_column.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _ex_chart_data_table: | ||
|
||
Example: Charts with Data Tables | ||
================================ | ||
|
||
Example of creating charts with data tables. | ||
|
||
Chart 1 in the following example is a column chart with default data table: | ||
|
||
.. image:: _static/chart_data_table1.png | ||
:scale: 75 % | ||
|
||
Chart 2 is a column chart with default data table with legend keys: | ||
|
||
.. image:: _static/chart_data_table2.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_data_table.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _ex_chart_data_tools: | ||
|
||
Example: Charts with Data Tools | ||
=============================== | ||
|
||
A demo of an various Excel chart data tools that are available via an | ||
XlsxWriter chart. These include, Trendlines, Data Labels, Error Bars, Drop | ||
Lines, High-Low Lines and Up-Down Bars. | ||
|
||
Chart 1 in the following example is a chart with trendlines: | ||
|
||
.. image:: _static/chart_data_tools1.png | ||
:scale: 75 % | ||
|
||
Chart 2 is a chart with data labels and markers: | ||
|
||
.. image:: _static/chart_data_tools2.png | ||
:scale: 75 % | ||
|
||
Chart 3 is a chart with error bars: | ||
|
||
.. image:: _static/chart_data_tools3.png | ||
:scale: 75 % | ||
|
||
Chart 4 is a chart with up-down bars: | ||
|
||
.. image:: _static/chart_data_tools4.png | ||
:scale: 75 % | ||
|
||
Chart 5 is a chart with hi-low lines: | ||
|
||
.. image:: _static/chart_data_tools5.png | ||
:scale: 75 % | ||
|
||
Chart 6 is a chart with drop lines: | ||
|
||
.. image:: _static/chart_data_tools6.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_data_tools.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _ex_chart_line: | ||
|
||
Example: Line Chart | ||
=================== | ||
|
||
Example of creating an Excel line chart. The X axis of a line chart is a | ||
category axis with fixed point spacing. For a line chart with arbitrary point | ||
spacing see the Scatter chart type. | ||
|
||
Chart 1 in the following example is: | ||
|
||
.. image:: _static/chart_line1.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_line.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _ex_chart_pie: | ||
|
||
Example: Pie Chart | ||
================== | ||
|
||
Example of creating Excel Column charts. | ||
|
||
Chart 1 in the following example is: | ||
|
||
.. image:: _static/chart_pie1.png | ||
:scale: 75 % | ||
|
||
Chart 2 shows how to set segment colours. | ||
|
||
It is possible to define chart colours for most types of XlsxWriter charts via | ||
the :func:`add_series()` method. However, Pie charts are a special case since | ||
each segment is represented as a point and as such it is necessary to assign | ||
formatting to each point in the series. | ||
|
||
.. image:: _static/chart_pie2.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_pie.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.. _ex_chart_radar: | ||
|
||
Example: Radar Chart | ||
==================== | ||
|
||
Example of creating Excel Column charts. | ||
|
||
Chart 1 in the following example is a default radar chart: | ||
|
||
.. image:: _static/chart_radar1.png | ||
:scale: 75 % | ||
|
||
Chart 2 in the following example is a radar chart with markers: | ||
|
||
.. image:: _static/chart_radar2.png | ||
:scale: 75 % | ||
|
||
Chart 3 in the following example is a filled radar chart: | ||
|
||
.. image:: _static/chart_radar3.png | ||
:scale: 75 % | ||
|
||
|
||
.. literalinclude:: ../../../examples/chart_radar.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. _ex_chart_scatter: | ||
|
||
Example: Scatter Chart | ||
====================== | ||
|
||
Example of creating Excel Scatter charts. | ||
|
||
Chart 1 in the following example is a default scatter chart: | ||
|
||
.. image:: _static/chart_scatter1.png | ||
:scale: 75 % | ||
|
||
Chart 2 is a scatter chart with straight lines and markers: | ||
|
||
.. image:: _static/chart_scatter2.png | ||
:scale: 75 % | ||
|
||
Chart 3 is a scatter chart with straight lines and no markers: | ||
|
||
.. image:: _static/chart_scatter3.png | ||
:scale: 75 % | ||
|
||
Chart 4 is a scatter chart with smooth lines and markers: | ||
|
||
.. image:: _static/chart_scatter4.png | ||
:scale: 75 % | ||
|
||
Chart 5 is a scatter chart with smooth lines and no markers: | ||
|
||
.. image:: _static/chart_scatter5.png | ||
:scale: 75 % | ||
|
||
|
||
.. literalinclude:: ../../../examples/chart_scatter.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _ex_chart_secondary_axis: | ||
|
||
Example: Secondary Axis Chart | ||
============================= | ||
|
||
Example of creating an Excel Line chart with a secondary axis. Note, the | ||
primary and secondary chart type must be the same. | ||
|
||
.. image:: _static/chart_secondary_axis1.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_secondary_axis.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _ex_chart_simple: | ||
|
||
Example: Chart (Simple) | ||
======================= | ||
|
||
Example of a simple column chart with 3 data series. | ||
|
||
The output from example 1 is: | ||
|
||
.. image:: _static/chart_simple.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _ex_chart_stock: | ||
|
||
Example: Stock Chart | ||
==================== | ||
|
||
Example of creating and Excel HiLow-Close Stock chart. | ||
|
||
Chart 1 in the following example is: | ||
|
||
.. image:: _static/chart_stock1.png | ||
:scale: 75 % | ||
|
||
.. literalinclude:: ../../../examples/chart_stock.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.