Setting date labels
Labels containing dates and displayed on a chart generated with GraphApplet can be manually passed to
the 'labels' parameter or automatically calculated, provided a start date is passed to the
'startdate' parameter. If a start date is informed, labels manually passed are ignored.
By default, the date increment takes place in a daily basis. Optionally, the increment
can be set in a weekly, monthly or yearly basis.
It is also possible to display only the name of the months at the beginning of each
monthly period, setting the 'monthlabelson' parameter to 'yes'. This parameter only
works in conjunction with the 'startdate' parameter.
The following applet displays a line chart whose labels were automatically calculated
by JetChart, in a weekly basis, starting at May 01,2002.
<applet code="GraphApplet.class" codebase="../../../demo/applets/classes" archive="GraphChart.jar" width=450 height=300>
<param name="startdate" value="05012002"><!-- The expected date format is mmddaaaa -->
<param name="dateincrement" value="1"><!--Sets a weekly increment -->
<param name="borderon" value="no">
<param name="title" value="The JetChart Library,Setting date labels">
<param name="verticallabelson" value="yes">
<param name="graphset0_autoscaleon" value="no">
<param name="graphset0_scalemaxvalue" value="200">
<param name="graphset0_scaleincrement" value="30">
<param name="serie1" value="line,Line series,0000ff">
<param name="serie1_markson" value="no">
<param name="serie1_thickness" value="2">
<param name="serie1_values" value="131.90,132.80,130.50,131.00,136.75,135.00,131.50,130.50,
132.40,133.30,130.90,123.40,122.25,118.00,120.00,116.10,
115.00,103.45,107.50,103.80,99.00,96.75,94.00,95.90,97.50,
98.40,100.20,102.00,110.40,104.50,108.70,107.75,107.45">
<param name="serie1_legendon" value="no">
</applet>
The 'dateincrement' parameter accepts the following values:
0 - Daily increment (default)
1 - Weekly increment
2 - Monthly increment
3 - Yearly increment