Creates a PNG/SVG chart image using data from a wiki table or another data source.

This macro is not so easy to use directly (it has really a lot of parameters) so there is a work-in-progress charting wizard. For more samples see this special page.


see example

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
typefalsearea, bar, line, pie, time The type of chart
sourcefalsemap The data source used for the table
typefalsetable, object and objectid In the sequel we only consider the more common case of table data sources.
doctruedocument namecurrent documentThe document that contains the source table
table_numbertruenumber0 (first table)The position of the table in the document. Numbering starts at 0 and only radeox tables are counted.
rangetrue* or of the form A4-C7*The part of the table that is charted
decimal_symboltruecharperiod (.)Usually comma (,) or period (.)
ignore_alphatruebooleanfalseWhether all illegal characters in the data are ignored instead of considered errors
has_header_rowtruebooleantrueWhether the first row is a header and should be used to name series
has_header_columntruebooleantrueWhether the first column is a header and should be used to name series
seriestruecolumns or rowscolumnsWhether the series are organized on rows or on columns
widthtruenumber400The width of the chart in pixels
heighttruenumber300The height of the chart in pixels

Entries in italic are possible keys in the preceding map parameter. The maps are semicolon (;) separated sequences of key-value pairs. The key and the value are separated by colon (:). For example "k1:v1;k2:v2;k3:v3" is a map with three entries.

There are a lot of other parameters not used so often.


Category | Sales ($)
Category 1 | 1000000
Category 2 |  500000
Category 3 |  500000
Total | = sum(B2:B4)

{chart:source=type:table;range:A1-B4|type=pie|title=pie in the sky}

See more samples here




Tags: charting

Get Connected