Configuring scales

Scales are found in charts displayed with GraphApplet and ScatterApplet. However, the way Scale objects are accessed is a bit different. When using GraphApplet, a scale is accessed through the graphset it belongs to. The name of any scale parameter is always prefixed by 'graphset' and respective id number. ScatterApplet does not implement graphsets, therefore the name of scale parameters is not prefixed.

By default the minimum, maximum and increment values of a scale are automatically calculated. The minimum and maximum values are calculated with respect to the minimum and maximum values of all series belonging to a graphset or directly added to ScatterApplet, and the increment is calculated in such a way that a scale labels do not overlap each other. If all series values are larger than or equal to zero, the minimum value is always zero.

An automatic scale might not be suitable in certain conditions. For instance, if a line series is assigned values of large magnitude, and these values do not vary intensively, a vertical chart displays a horizontal line next to the scale top and slightly jagged, in which case it is not possible to distinguish and analyze data evolution. So, it is necessary to manually set scale properties, adjusting the minimum, maximum and increment values to make the scale range suitable for visualizing data variation. The example below displays an area series with large values ranging between 20000 and 20010. The scale was configured to facilitate data visualization.



<applet code="GraphApplet.class" codebase="../../demo/applets/classes" archive="GraphChart.jar" width=450 height=300>
<param name="title" value="The JetChart Library,Configuring scales">
<param name="labels" value="l1,l2,l3,l4,l5,l6,l7,l8,l9">

<param name="graphset0_autoscaleon" value="no">
<param name="graphset0_scalemaxvalue" value="20010">
<param name="graphset0_scaleminvalue" value="20000">
<param name="graphset0_scaleincrement" value="2">
<param name="graphset0_scalevalueformat" value="##,###">

<param name="graphset0_gridon" value="yes">
<param name="graphset0_gridcolor" value="999999">
<param name="graphset0_gridstyle" value="1">
<param name="serie1" value="area,Area series,009900">
<param name="serie1_values" value="20007,20005,20006,20004,20003,20005,20007,20009,20006">
<applet>