Combining series

JetChart represents a series as an individual object, which has to be created, configured and added to the chart context. This approach makes it possible to create instances of different types of series and simultaneously display them on the same chart context. Unlike GraphApplet and ScatterApplet, PieApplet only supports one series. It is not possible to combine GraphApplet series with ScatterApplet series. However, GraphApplet series can be combined with each other, as well as ScatterApplet series.

To display more than one series in one single chart, just create series as explained in the previous topics. A maximum number of 20 series can be displayed at the same time, and each series must be assigned an index ranging from 1 to 20. To display more than 20 series it is necessary to apply a minor change to the source code of GraphApplet and ScatterApplet and recompile these applets.

The following example displays a red line series and a blue bar series.



<applet code="GraphApplet.class" codebase="../../demo/applets/classes" archive="GraphChart.jar" width=400 height=250>

<param name="serie1" value="line,LineSeries,ff0000">
<param name="serie1_values" value="100,80,90,40,75,60,85">
<param name="serie2" value="bar,Bar Series,0000ff">
<param name="serie2_values" value="50,70,80,30,60,55,75">

</applet>

To change bar series width, do as follows:
<param name="serie2_width" value="5">

Bar series width are set to 10 pixels, by default.