General Actions:
| Generates graphical charts from various data sources |
| Type | JAR |
| Developed by | |
| License | GNU Lesser General Public License 2.1 |
| Bundled With | XWiki Enterprise, XWiki Enterprise Manager |
Table of contents
Currently chart macro supports two types of data sources. Usage of the macro slightly differs from "xdom" mode to "inline" mode:
Usage for "xdom" data sources:
Usage for "inline" data sources:
| Name | Optional | Allowed values | Default value | Description |
|---|---|---|---|---|
| type | no | line, area, bar, pie, bar3D or line3D | none | Type of chart to be generated. bar3D and line3D have been added in XWiki 4.1 |
| source | yes | xdom or inline | xdom | Type of the data source which provides input for charting. |
| params | yes | string | none | Additional parameters for the data source. This string contains a list of parameter name to value mappings. Available parameter names and values depend on the data source being used (refer examples below). |
| title | yes | string | none | A title string to be used when rendering the chart |
| width | yes | string | 400 | Width of the chart image in pixels |
| height | yes | string | 300 | Height of the chart image in pixels |
An "xdom" data source can be used when you need to draw charts from data tables located anywhere in the wiki. For an example, let's say *xwiki:Main.Data* wiki page contains the following data table definition:
Then you can draw a chart from this data table with following syntax (from any wiki page):
For our example with *Main.Data*, the syntax is:
NOTE: As you can see here, the "params" string is used to clearly define input data source:
Result:

See also the Syntax Distribution Chart Snippet for another example.