KupoChart 0.1.5 Documentation: 2D Pie Charts
- Required Parameters
- cht: Chart type
- chd: Chart data
- Optional Parameters
- chs: Chart size (width and height)
- chco: Chart colours / colors
- outputtype: Output type (PNG or SVG)
- Examples
To graph a 2D pie chart, you must pass the following required parameters:
- cht:
Chart type. Must be set to 'p'.
- chd:
Chart data.
This is a string of comma-delimited values, preceded by 't:' indicating 'text' data type. Support for other data types will be added later.
Example: t:12,37,15,9,20,7
Note that unlike Google Chart, values do not need to add up to 100 in this mode. If values of 100 and 900 are provided, the 100 slice will be 10% of the pie and the 900 slice will be 90%.
Google Chart would crop each value to 100 and display a pie with two 50% slices.
When graphing a pie chart, one may pass the following optional parameters: