KupoChart 0.1.5 Documentation: 2D Line Charts (X/Y)
- Required Parameters
- cht: Chart type
- chd: Chart data
- Optional Parameters
- Examples
To graph a 2D line (X/Y) chart, you must pass the following required parameters:
- cht:
Chart type. Must be set to 'lxy'.
- chd:
Chart data.
This is a string of pipe-delimited value sets, alternating between sets of X coordinates and sets of Y coordinatepes. The value sets are separated by pipes (i.e. '|'). The whole string is preceded by 't:', indicating 'text' data type. Support for other data types will be added later.
Example: t:0,20,30,50|10,20,30,40|0,20,30,50|30,25,38,62
This example corresponds to two lines. The first line is specified by 0,20,30,50|10,20,30,40 and corresponds to the following series of points:
(0,10); (20,20); (30,30); (50,40)
The second line is specified by 0,20,30,50|30,25,38,62 and corresponds to the following series of points:
(0,30); (20,25); (30,38); (50,62)
When graphing a pie chart, one may pass the following optional parameters: