Working with graphsets

The examples presented so far, built on top of the GraphApplet class, display series against one scale only. A graphset is an object used to group series separately and display them against multiple scales. Graphsets can have their respective scales start and end points configured to stack series one above the other.

Graphsets are entities that have to be explicitily created using a parameter. The only exception is the 'primary' graphset, which is internally created by JetChart to hold all series that are not grouped into 'secondary' graphsets.

In addition to keeping independent scales, each graphset contains a horizontal axis, two vertical axis, a wall, a scrolling bar, a grid and a series base, which is a line drawn across the chart area to help distinguish the positive and negative chart regions.

Each graphset is assigned an index, used to identify and configure their entities, like the grid, scale, etc. The primary graphset is always assigned the index '0'.

A list of all graphset parameters can be found here.

The example below plots two series against different scales, positioned along the left and right vertical axis.



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

<param name="borderon" value="no">
<param name="title" value="The JetChart Library,Working with graphsets">
<param name="labels" value="label1,label2,label3,label4,label5,label6">
<param name="labelsfont" value="Dialog,10,0">
<param name="verticallabelson" value="yes">

<-- Sets the properties of the primary graphset(index 0) -->
<param name="graphset0_scalecolor" value="0000ff">
<param name="graphset0_scalevalueformat" value="#,###">
<param name="graphset0_gridon" value="yes">
<param name="graphset0_gridbandson" value="yes">

<param name="nrofgraphsets" value="1"> <!-- Creates one secondary graphset -->

<-- Sets the properties of the secondary graphset(index 1) -->
<param name="graphset1_scaleposition" value="1">
<param name="graphset1_scalecolor" value="009900">
<param name="graphset1_scalevalueformat" value="## %">
<param name="graphset1_gridon" value="yes">
<param name="graphset1_gridcolor" value="999999">

<param name="legend0_position" value="2"> <!-- Sets the position of the primary legend box. -->
<param name="nroflegends" value="1"> <!-- Creates one secondary legend box -->
<param name="legend1_position" value="0"> <!-- Places the secondary legend to the left. -->

<param name="serie1" value="line,Line series,0000ff">
<param name="serie1_values" value="20000,15000,10000,30000,35000,25000">
<param name="serie1_thickness" value="2">
<param name="serie1_legendindex" value="1"> <!-- Sets the index of the secondary legend box that will display this series' title. -->
<param name="serie2" value="bar,Bar series,009900">
<param name="serie2_values" value=".55,.43,.60,.80,.90,.30">

<!-- Connects the bar series to the secondary graphset -->
<param name="serie2_graphsetindex" value="1">

</applet>