📄 barchart.html
字号:
public int <B>getgridAlignment</B>()</PRE>
<DL>
<DD>Gets the bar alignment.<DD><DL>
<DT><B>Returns:</B><DD>HORIZONTAL or VERTICAL.<DT><B>See Also: </B><DD><A HREF="../../../com/objectplanet/chart/BarChart.html#setBarAlignment(int)"><CODE>setBarAlignment(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getLegendLabels()"><!-- --></A><H3>
getLegendLabels</H3>
<PRE>
public java.lang.String[] <B>getLegendLabels</B>()</PRE>
<DL>
<DD>Gets the legend labels. The array returned is the original, so don't change anything in it if you don't know what you are doing.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/objectplanet/chart/Chart.html#getLegendLabels()">getLegendLabels</A></CODE> in class <CODE><A HREF="../../../com/objectplanet/chart/Chart.html">Chart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An array with the labels.</DL>
</DD>
</DL>
<HR>
<A NAME="getSampleCenter(int, int)"><!-- --></A><H3>
getSampleCenter</H3>
<PRE>
protected java.awt.Point <B>getSampleCenter</B>(int sample, int serie)</PRE>
<DL>
<DD>Calculates the center point of the sample.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/objectplanet/chart/Chart.html#getSampleCenter(int, int)">getSampleCenter</A></CODE> in class <CODE><A HREF="../../../com/objectplanet/chart/Chart.html">Chart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sample</CODE> - Index of the sample.<DD><CODE>serie</CODE> - Serie of the sample.<DT><B>Returns:</B><DD>The center point of the sample</DL>
</DD>
</DL>
<HR>
<A NAME="getValuePosition(double)"><!-- --></A><H3>
getValuePosition</H3>
<PRE>
public int <B>getValuePosition</B>(double value)</PRE>
<DL>
<DD>Gets the position in the chart of the specified value. If the alignment of the bars is VERTICAL the position represents the y-axis. If the alignment of the bars is HORIZONTAL the position represents the x-axis.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The value to find the position for.<DT><B>Returns:</B><DD>The pixel position.</DL>
</DD>
</DL>
<HR>
<A NAME="isAutoLabelSpacingOn()"><!-- --></A><H3>
isAutoLabelSpacingOn</H3>
<PRE>
public boolean <B>isAutoLabelSpacingOn</B>()</PRE>
<DL>
<DD>Gets the state of the automatic label spacing.<DD><DL>
<DT><B>Returns:</B><DD>True for on, false for off.<DT><B>See Also: </B><DD><A HREF="../../../com/objectplanet/chart/BarChart.html#setAutoLabelSpacingOn(boolean)"><CODE>setAutoLabelSpacingOn(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isBarLabelsOn()"><!-- --></A><H3>
isBarLabelsOn</H3>
<PRE>
public boolean <B>isBarLabelsOn</B>()</PRE>
<DL>
<DD>Checks if the bar labels are turned on.<DD><DL>
<DT><B>Returns:</B><DD>True for on, false for off.</DL>
</DD>
</DL>
<HR>
<A NAME="isBarOutlineOn()"><!-- --></A><H3>
isBarOutlineOn</H3>
<PRE>
public boolean <B>isBarOutlineOn</B>()</PRE>
<DL>
<DD>Checks if the bar outline is turned on or off. The bar outline is the frame drawn around each bar.<DD><DL>
<DT><B>Returns:</B><DD>True if on, false for off.</DL>
</DD>
</DL>
<HR>
<A NAME="isMultiColorOn()"><!-- --></A><H3>
isMultiColorOn</H3>
<PRE>
public boolean <B>isMultiColorOn</B>()</PRE>
<DL>
<DD>Checks if the multicolor mode is turned on.<DD><DL>
<DT><B>Returns:</B><DD>True if multicolor, false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isMultiSeriesOn()"><!-- --></A><H3>
isMultiSeriesOn</H3>
<PRE>
public boolean <B>isMultiSeriesOn</B>()</PRE>
<DL>
<DD>Checks if the chart is in multi series mode.<DD><DL>
<DT><B>Returns:</B><DD>True for multi series, false otherwise.<DT><B>See Also: </B><DD><A HREF="../../../com/objectplanet/chart/BarChart.html#setMultiSeriesOn(boolean)"><CODE>setMultiSeriesOn(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="render(java.awt.Graphics)"><!-- --></A><H3>
render</H3>
<PRE>
public void <B>render</B>(java.awt.Graphics g)</PRE>
<DL>
<DD>Renders the bar chart according to the current chart attributes and which charts features are turned on or off.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/objectplanet/chart/Chart.html#render(java.awt.Graphics)">render</A></CODE> in class <CODE><A HREF="../../../com/objectplanet/chart/Chart.html">Chart</A></CODE></DL>
</DD>
<DD>Following copied from class: <CODE>com.objectplanet.chart.Chart</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>g</CODE> - The graphics context used to paint with.<DT><B>See Also: </B><DD><A HREF="../../../com/objectplanet/chart/Chart.html#paint(java.awt.Graphics)"><CODE>Chart.paint(java.awt.Graphics)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="renderData(java.awt.Graphics, java.awt.Rectangle, java.awt.Rectangle)"><!-- --></A><H3>
renderData</H3>
<PRE>
protected void <B>renderData</B>(java.awt.Graphics g, java.awt.Rectangle grid, java.awt.Rectangle dataBounds)</PRE>
<DL>
<DD>Renders the bars and the value labels.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/objectplanet/chart/Chart.html#renderData(java.awt.Graphics, java.awt.Rectangle, java.awt.Rectangle)">renderData</A></CODE> in class <CODE><A HREF="../../../com/objectplanet/chart/Chart.html">Chart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>g</CODE> - The graphics context used to paint with.<DD><CODE>grid</CODE> - The grid bounds to paint within.<DD><CODE>dataBounds</CODE> - The scrolled data bounds to calculate the bars from.</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public void <B>reset</B>()</PRE>
<DL>
<DD>Resets the chart data and features.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/objectplanet/chart/Chart.html#reset()">reset</A></CODE> in class <CODE><A HREF="../../../com/objectplanet/chart/Chart.html">Chart</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setAutoLabelSpacingOn(boolean)"><!-- --></A><H3>
setAutoLabelSpacingOn</H3>
<PRE>
public void <B>setAutoLabelSpacingOn</B>(boolean on)</PRE>
<DL>
<DD>Turns on or off automatic bar label spacing. If this is on, only bar labels there is space for will be painted. If turned off, all labels will be painted, even if they overlap. It is turned off by default.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>on</CODE> - True for on, false for off.</DL>
</DD>
</DL>
<HR>
<A NAME="setBarAlignment(int)"><!-- --></A><H3>
setBarAlignment</H3>
<PRE>
public void <B>setBarAlignment</B>(int alignment)</PRE>
<DL>
<DD>Sets the bar alignment. The default alignment is vertical.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>alignment</CODE> - HORIZONTAL or VERTICAL.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - If the alignment is not valid.</DL>
</DD>
</DL>
<HR>
<A NAME="setBarLabelColor(int, java.awt.Color)"><!-- --></A><H3>
setBarLabelColor</H3>
<PRE>
public void <B>setBarLabelColor</B>(int index, java.awt.Color color)</PRE>
<DL>
<DD>Sets the color of of the bar label for the specified sample. Bar label colors override sample label colors.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the sample (0-based).<DD><CODE>color</CODE> - The color to use, null for the samleColors color.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the sa
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -