1. Horizontal value lines.
2. Vertical grid lines
Turn on horizontal value lines.
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="10,20,30,40,50">
<param name=valueLinesOn value=true>
</applet>
Set the color of the value lines
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="10,20,30,40,50">
<param name=valueLinesOn value=true>
<param name=valueLinesColor value=orange>
</applet>
Set the maximum number of value lines
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="10,20,30,40,50">
<param name=valueLinesOn value=true>
<param name=maxValueLineCount value=5>
</applet>
Setting the vertical grid lines.
Use the defaultGridLinesOn parameter to turn on the default vertical grid lines. By default, there is one line between each bar.
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="10,20,30,40,50">
<param name=defaultGridLinesOn value=true>
</applet>
You can control the start position and interval of the grid lines by adding the start and interval numbers in the defaultGridLinesOn parameter.
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="10,20,30,40,50">
<param name=defaultGridLinesOn value="true,10,20">
<param name=range value=100>
</applet>
The start and interval numbers are relative to the sample axis range which by default goes from 1 to 100. You can set the sample axis range using the sampleAxisRange parameter, so you have easier control over the lines.
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="65,45,76,57,47,74,75,36,46,47,72,34">
<param name=sampleAxisRange value="0,12">
<param name=defaultGridLinesOn value="true,3,3">
<param name=range value=100>
</applet>
Setting the color of the grid lines.
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="10,20,30,40,50">
<param name=defaultGridLinesOn value=true>
<param name=gridLinesColor value="red">
</applet>
In addition to the default vertical grid lines, you can set lines at explisit positions in the chart by using the gridLines parameter and a comma seperated list of relative positions.
<applet code=com.objectplanet.chart.BarChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="1,2,3,4,5,6,7">
<param name=sampleLabels value="mon,tue,wed,thu,fri,sat,sun">
<param name=barLabelsOn value=true>
<param name=sampleAxisRange value="0,7">
<param name=gridLines value="5,6">
<param name=gridLineColors value="blue, red">
</applet>