XML - Full
The full xml format is the most verbose and the most human readable of the supported formats. This format is ideal for experimenting with chart configuration and charts with smaller datasets.
General Usage:
<graph> <plot> <point x="1" y="1" /> <point x="2" y="2" /> <point x="3" y="3" /> <point x="4" y="4" /> </plot> </graph>
Series Data Formats:
The above example is used for the majority of currently supported data series types. There are exceptions such as the EJSC.PieSeries, EJSC.AnalogGaugeSeries and others. For a full description of the data format for a given series, see the Data Formats topic below each series section.
Text Labels:
At times, numeric labels and the auto scaling options in the chart are not necessary, not available or not desired for display data. A EJSC.BarSeries for instance, which is used to compare number of widgets sold by color. The chart supports providing text as the X value, rather than a number:
<graph> <plot> <point x="Blue" y="100" /> <point x="Red" y="200" /> <point x="Green" y="50" /> </plot> </graph>
User-Defined Data:
When displaying custom hints and implementing drill down style reports it is often necessary to have an additional piece of data associated with each data point such as a database id value. The full and short xml formats support the userdata property which is read in and assigned to the associated EJSC.Point descendant. The value specified is entirely up to the developer. It could be a set of integers representing a database primary key value, a url which points to drill-down data or even a javascript function. The userdata property of a point is available during point-related events in the chart such as EJSC.Chart.onDblClickPoint, EJSC.Chart.onAfterSelectPoint, etc.
<graph> <plot> <point x="1" y="100" userdata="WHERE PointId=10432" /> <point x="2" y="200" userdata="./drillDown2.xml" /> <point x="3" y="50" userdata="alert('this is the userdata');" /> </plot> </graph>
|