📄 barchart.html
字号:
setSeriesLabels(new String[] {"2000","2001","2002"});<hr size=1 color="#c0c0c0">
seriesLabels=2000,2001,2002
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="seriesLabelsOn"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>seriesLabelsOn</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Turns on the series labels. You can display the series labels
outside the bars, inside the bars, or as tooltip labels. Control the style
with the valueLabelStyle parameter.
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="seriesLabelsOn" value=true><hr size=1 color="#c0c0c0">
setSeriesLabelsOn(true);<hr size=1 color="#c0c0c0">
seriesLabelsOn=true
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="seriesLabelColors"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>seriesLabelColors</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the colors of the series labels when used in the legend.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="seriesLabelColors" value="red, green, blue"><hr size=1 color="#c0c0c0">
setSeriesLabelColor(0, Color.red);<br>
setSeriesLabelColor(1, Color.green);<br>
setSeriesLabelColor(2, Color.blue);<hr size=1 color="#c0c0c0">
seriesLabelColors=red,green,blue
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="seriesLabelStyle"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>seriesLabelStyle</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the style of the series labels. The sereis labels can be inside each bar,
outside each bar or floating above each bar as the mouse moves over it.
The default is floating.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="seriesLabelStyle" value="inside"><br>
<param name="seriesLabelStyle" value="outside"><br>
<param name="seriesLabelStyle" value="floating"><hr size=1 color="#c0c0c0">
setSeriesLabelStyle(BarChart.INSIDE);<br>
setSeriesLabelStyle(BarChart.OUTSIDE);<br>
setSeriesLabelStyle(BarChart.FLOATING);<hr size=1 color="#c0c0c0">
seriesLabelStyle=inside<br>
seriesLabelStyle=outside
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendOn"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendOn</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Turns on the legend placing it at the default right position.
Use the legendPosition parameter to control the placement of the legend.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendOn" value=true><hr size=1 color="#c0c0c0">
setLegendOn(true);<hr size=1 color="#c0c0c0">
legendOn=true
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendLabels"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendLabels</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Overrides the default labels in the legend. The default labels are either
the sampleLabels if 1 data series is used or the seriesLabels
if multiple data series is used. If the value is either sampleLabels or
seriesLabels the respective label set is used in the legend.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendLabels" value="2000, 2001, 2002"><br>
<param name="legendLabels" value="sampleLabels"><br>
<param name="legendLabels" value="seriesLabels"><hr size=1 color="#c0c0c0">
setLegendLabels(new String[] {"2000","2001","2002"});<hr size=1 color="#c0c0c0">
legendLabels=2000,2001,2002<br>
legendLabels=sampleLabels<br>
legendLabels=seriesLabels
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendPosition"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendPosition</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the legend position. Possible positions are right, left, top,
and bottom.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendPosition" value="left"><hr size=1 color="#c0c0c0">
setLegendPosition(BarChart.LEFT);<br>
setLegendPosition(BarChart.RIGHT);<br>
setLegendPosition(BarChart.TOP);<br>
setLegendPosition(BarChart.BOTTOM);<hr size=1 color="#c0c0c0">
legendPosition=bottom
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendColumns"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendColumns</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the number of columns that should be used to display legend labels.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendColumns" value=4><hr size=1 color="#c0c0c0">
setLegendColumns(3);<hr size=1 color="#c0c0c0">
legendColumns=5
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendFont"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendFont</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the font for the labels in the legend.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendFont" value="Dialog, plain, 12"><hr size=1 color="#c0c0c0">
setFont("legendFont", new Font("Dialog", Font.PLAIN, 12));<hr size=1 color="#c0c0c0">
legendFont=Dialog,plain,12
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendColors"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendColors</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the colors for the default legend boxes. If this is not set,
the colors are taken from the sampleColors parameter.<br>
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendColors" value="red, blue, green"><hr size=1 color="#c0c0c0">
setLegendColors(new Color[] {Color.red, Color.blue, Color.green});<hr size=1 color="#c0c0c0">
legendColors=red,blue,green
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="legendImage"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>legendImage</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets an image to be used in front of the legend label instead of the
default legend box. For the applet the image is specified as a relative URL.
This only works if the applet is allowed to connect back to the web server.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="legendImage_0" value="blue_ball.gif"><br>
<param name="legendImage_1" value="images/red_ball.gif"><hr size=1 color="#c0c0c0">
Image image = ... load image blue_ball.gif from disk<br>
addImage("legendImage_0", image);<br>
setLegendImage(0, "legendImage_0");
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="sampleAxisLabel"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>sampleAxisLabel</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Adds a label below the sample (X) axis.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="sampleAxisLabel" value="sample axis"><hr size=1 color="#c0c0c0">
setLabel("sampleAxisLabeL", "sample axis");<hr size=1 color="#c0c0c0">
sampleAxisLabel=sample axis
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="sampleAxisLabelFont"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>sampleAxisLabelFont</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the font used for the sampleAxisLabel.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="sampleAxisLabelFont" value="Dialog, plain, 12"><hr size=1 color="#c0c0c0">
setFont("sampleAxisLabelFont", new Font("Dialog", Font.PLAIN, 12));<hr size=1 color="#c0c0c0">
sampleAxisLabelFont=Dialog,plain,12
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="sampleAxisLabelAngle"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>sampleAxisLabelAngle</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the clockwise angle of the sample axis label. Useful if you use
horizontal bars and the sample axis is at the left of the chart grid.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="sampleAxisLabelAngle" value="270"><hr size=1 color="#c0c0c0">
setLabelAngle("sampleAxisLabelAngle", 270);<hr size=1 color="#c0c0c0">
sampleAxisLabelAngle=270
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="valueLabelsOn"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>valueLabelsOn</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Turns on the value labels for the bars. You can display the value labels
outside the bars, inside the bars, or as tooltip labels. Control the
style with the valueLabelStyle parameter.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="valueLabelsOn" value=true><br>
<param name="valueLabelsOn_2" value=false><hr size=1 color="#c0c0c0">
setValueLabelsOn(true);<br>
setValueLabelsOn(1, false);<hr size=1 color="#c0c0c0">
valueLabelsOn=true
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="sampleDecimalCount"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>sampleDecimalCount</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the number of fixed decimals to use for the value labels.
Use sampleDecimalCount_N to control the decimals per data series.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="sampleDecimalCount" value=3><br>
<param name="sampleDecimalCount_2" value=0><hr size=1 color="#c0c0c0">
setSampleDecimalCount(-1, 3); // -1 specifies all series<br>
setSampleDecimalCount(0, 2); // serie 0, 2 decimals<hr size=1 color="#c0c0c0">
sampleDecimalCount=3<br>
sampleDecimalCount_2=1
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="valueLabelStyle"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>valueLabelStyle</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the style of the value labels. The value labels can be inside each bar,
outside each bar, or floating above each bar as the mouse moves over it.
The default is outside.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="valueLabelStyle" value="outside"><br>
<param name="valueLabelStyle" value="inside"><br>
<param name="valueLabelStyle" value="floating"><hr size=1 color="#c0c0c0">
setValueLabelStyle(Chart.INSIDE);<br>
setValueLabelStyle(Chart.OUTSIDE);<br>
setValueLabelStyle(Chart.FLOATING);<hr size=1 color="#c0c0c0">
valueLabelStyle=inside<br>
valueLabelStyle=outside
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="floatingOnLegendOff"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>floatingOnLegendOff</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
By default floating labels are displayed for all the samples in the
selected series when the mouse moves over a series label in the legend.
This parameter turns this behavior off.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="floatingOnLegendOff" value="true"><hr size=1 color="#c0c0c0">
setFloatingOnLegendOn(false);<hr size=1 color="#c0c0c0">
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="valueLabelFont"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>valueLabelFont</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Sets the font for the static value labels.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="valueLabelFont" value="Dialog, plain, 12"><hr size=1 color="#c0c0c0">
setFont("valueLabelFont", new Font("Dialog", Font.PLAIN, 12));<hr size=1 color="#c0c0c0">
valueLabelFont=Dialog,plain,12
</font>
</td>
</tr>
<tr bgcolor="#e0e0e0">
<a name="valueLabelPrefix"></a>
<td colspan=2><font face="verdana,arial,helvetica" size=-1><b>valueLabelPrefix</b></font></td></tr>
<tr><td valign=top width=40%><font face="verdana, arial" size=-1>
Adds a prefix before all value labels. You can also set the prefix for
individual data series by adding the series index.
</td>
<td valign=top width=60%><font face="verdana, arial" size=-2>
<param name="valueLabelPrefix" value="$"><br>
<param name="valueLabelPrefix_2" value="
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -