1. Setting the chart title
2. Set the sample labels
3. Vertical sample labels
4. Multiline sample labels
5. Floating sample labels
6. Sample label colors
7. Automatic label spacing and sample scroller
8. Configuring the label delimiter
9. Series labels
10. Combining the labels
11. Axis labels
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=chartTitle value="chart title">
<param name=titleFont value="Courier, bold, 20">
</applet>
Add \n for a line break in the title
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=chartTitle value="chart\ntitle">
<param name=titleFont value="Courier, bold, 20">
</applet>
<applet code=com.objectplanet.chart.SampleChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=sampleLabels value="one,two,three,four,five">
<param name=sampleLabelsOn value=true>
</applet>
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=sampleLabels value="monday, tuesday, wednesday, thursday, friday">
<param name=sampleLabelsOn value=true>
<param name=sampleLabelAngle value=270>
</applet>
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=500 height=200>
<param name=sampleValues value="78,67,54,78,79,86,98,76,56,75,45,43,55,76,57,54,35,66,45,68,75,75,46,46,54,78,67,56,53,87....">
<param name=sampleLabels value="
january, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
february, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
march, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
april, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
may, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
june">
<param name=sampleLabelsOn value=true>
</applet>
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=sampleLabels value="jan\n2001,feb\n2001,mar\n2001,apr\n2001,may\n2001">
<param name=sampleLabelsOn value=true>
</applet>
Move your mouse over the sample points on the line to display sample labels.
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=sampleLabels value="one,two,three,four,five">
<param name=sampleLabelsOn value=true>
<param name=sampleLabelStyle value=floating>
<param name=floatingLabelFont value="Arial,bold,16">
</applet>
6. You can set the colors of the sample labels
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=sampleLabels value="one,two,three,four,five">
<param name=sampleLabelsOn value=true>
<param name=sampleLabelColors value="black, red, black, blue, black">
</applet>
7. Automatic label spacing and sample scroller
If you have to many sample labels and they overlap, you can turn on autospacing of the labels and only the ones there is space for will be painted. Drag the sample scroller ends to see the effect.
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="6,8,7,9,8,7,9,8,7,8,7,6,9,8,6,8,7,6,5,7,6,4,6,5,4,3,5,3,4,3">
<param name=sampleLabels value="01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30">
<param name=sampleLabelsOn value=true>
<param name=sampleScrollerOn value=true>
<param name=autoLabelSpacingOn value=true>
</applet>
8. Configuring the label delimiter
If you want commas (,) in your labels you need to set the label delimiter.
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=sampleValues value="20,10,40,30,50">
<param name=sampleLabels value="jan,2001:feb,2001:mar,2001:apr,2001:may,2001">
<param name=sampleLabelsOn value=true>
<param name=labelDelimiter value=":">
</applet>
The series labels are displayed in the legend.
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=seriesCount value=2>
<param name=sampleValues_0 value="20,10,40,30,50">
<param name=sampleValues_1 value="45,35,64,32,42">
<param name=seriesLabels value="Data A,Data B">
<param name=legendOn value=true>
</applet>
You can set the color of the series labels.
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=seriesCount value=2>
<param name=sampleValues_0 value="20,10,40,30,50">
<param name=sampleValues_1 value="45,35,64,32,42">
<param name=seriesLabels value="Data A,Data B">
<param name=seriesLabelColors value="red, blue">
<param name=legendOn value=true>
</applet>
You can combine series, sample and value labels.
<applet code=com.objectplanet.chart.LineChartApplet
archive=chart.jar width=300 height=200>
<param name=seriesCount value=2>
<param name=sampleValues_0 value="20,10,40,14,30">
<param name=sampleValues_1 value="45,35,64,39,46">
<param name=sampleLabels value="one,two,three,four,five">
<param name=sampleLabelsOn value=true>
<param name=sampleLabelStyle value=outside>
<param name=seriesLabels value="Data A,Data B">
<param name=seriesLabelsOn value=true>
<param name=seriesLabelStyle value=outside>
<param name=valueLabelsOn value=true>
</applet>