com.objectplanet.chart
Class Grid

java.lang.Object
  extended by com.objectplanet.chart.Grid
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PlotterGrid

public class Grid
extends java.lang.Object
implements java.io.Serializable

This class represents the chart grid with all ranges and lables.

Author:
Bjorn J. Kvande., Philipp Kolibaba.
See Also:
Serialized Form

Field Summary
static int HORIZONTAL
          Horizontal bar alignment.
static int TARGET_LINE_ID_AND_VALUE_LABEL
          Use both the ID and value label with the target lines; setTargetValueLine().
static int TARGET_LINE_ID_LABEL
          Use the ID label with the target lines; setTargetValueLine().
static int TARGET_LINE_NO_LABEL
          Use no label with the target lines; setTargetValueLine().
static int TARGET_LINE_VALUE_LABEL
          Use the value label with the target lines; setTargetValueLine().
static int VERTICAL
          Vertical bar alignment.
 
Constructor Summary
Grid(GenericChart chart)
          Creates the chart grid.
 
Method Summary
 java.lang.String formatRangeNumber(int index, double value)
          Formats a floating number to the number of decimals given for the specified range.
 double getCurrentLowerRange(int range)
          Gets the current lower range of the specified range.
 double getCurrentRange(int range)
          Gets the current upper range of the specified range.
 java.awt.Insets getGraphInsets()
          Gets the graph insets.
 int getGridAlignment()
          Gets the bar alignment.
 double getGridLine(int index)
          Gets grid lines positon value by its index.
 java.awt.Color getGridLineColor(int index)
          Gets grid line's color value by it's index.
 java.awt.Color[] getGridLineColors()
          Gets the vertical grid lines colors.
 double[] getGridLines()
          Gets the vertical grid lines positons.
 double getLowerRange(int index)
          Gets the lower value of the specified range.
 int getMaxValueLineCount()
          Gets the current maxium number of value lines set.
 double getRange(int index)
          Gets the upper value of the specified range.
 int getRangeAdjusted(int adjuster)
          Gets the range(s) adjusted by the specified adjuster.
 int getRangeAdjusterPosition()
          Gets the position of the first range adjuster.
 java.awt.Color getRangeColor(int index)
          Gets the color of the specified range.
 int getRangeCount()
          Gets number of ranges used in the grid.
 int getRangeDecimalCount(int index)
          Gets the number of decimals used in the range values.
 java.text.NumberFormat getRangeFormatter(int index)
          Get the number formatter of this range.
 double getRangeInterval(int range)
          Gets the interval between the ticks on the specified range.
 int getRangePosition(int index)
          Gets the range position.
 int getTargetLabelsPosition()
          Gets the target labels position
 double getTargetValueLine(java.lang.String id)
          Gets the value of a target value line.
 java.awt.Color getValueLinesColor()
          Gets the color of the value lines.
 boolean isDefaultGridLinesOn()
          Checks if the default vertical grid lines are on.
 boolean isGridAdjustmentOn(int edge)
          Checks if runtime grid adjustment is on.
 boolean isRangeAdjusterOn(int adjuster)
          Checks if the specified range adjuster is turned on.
 boolean isRangeLabelsOn(int index)
          Checks if the range labels are on or off.
 boolean isRangeOn(int index)
          Checks if the specified range is on.
 boolean isRightToLeftScrollingOn()
          Checks if the right to left scrolling is turned on.
 boolean isSampleScrollerOn()
          Checks if the sample scroller is turned on.
 boolean isValueLinesOn()
          Checks if the value lines are turned on.
 void reset()
          Resets the chart data and features.
 void setCurrentLowerRange(int range, double lower)
          Sets the current lower range of the specified range.
 void setCurrentRange(int range, double upper)
          Sets the current upper range of the specified range.
 void setDefaultGridLinesColor(java.awt.Color color)
          Sets the color of the default vertical grid lines.
 void setDefaultGridLinesOn(boolean on)
          Turns on or off the default vertical grid lines.
 void setDefaultGridLinesOn(boolean on, double start, double step)
          Turns on or off the default vertical grid lines.
 void setGraphInsets(int top, int left, int bottom, int right)
          Sets the insets between the graph itself and the chart component edges.
 void setGridAdjustmentOn(int edge, boolean on)
          Turns on or of runtime grid adjustment.
 void setGridAlignment(int alignment)
          Sets the bar alignment.
 void setGridLine(int index, double value)
          Sets a single grid line value.
 void setGridLineColor(int index, java.awt.Color color)
          Sets a single grid line color.
 void setGridLineColors(java.awt.Color[] colors)
          Sets the color of each vertical grid line.
 void setGridLines(double[] lines)
          Sets the vertical grid lines positons.
 void setGridLinesColor(java.awt.Color color)
          Sets the vertical grid lines color.
 void setLowerRange(int index, double range)
          Sets the lower range of the chart.
 void setLowerRelativeRange(double range)
          Sets the lower range of the chart relative to the current minimum value.
 void setLowerRelativeRange(double range, double step)
          Sets the lower range of the chart relative to the minimum value of the bars in the chart.
 void setLowerRelativeRange(int index, double range, double step)
          Sets the lower range of the chart relative to the minimum value of the bars in the chart.
 void setMaxValueLineCount(int count)
          Sets the maximum number of value lines there should be in the chart.
 void setRange(int index, double range)
          Sets the upper value of the specified range.
 void setRangeAdjusted(int adjuster, int range)
          Sets which range(s) to be adjusted by the specified adjuster.
 void setRangeAdjusterOn(int adjuster, boolean on)
          Turns on or off the range adjuster.
 void setRangeAdjusterPosition(int position)
          Sets the position of the first range adjuster.
 void setRangeColor(int index, java.awt.Color color)
          Sets the color of the specified range.
 void setRangeDecimalCount(int index, int count)
          Sets the number of decimals to use in the range label values.
 void setRangeFormatter(int index, java.text.NumberFormat formatter)
          Sets a number formatter for the specific range.
 void setRangeInterval(int range, double interval)
          Sets interval between the ticks on the specified range.
 void setRangeLabelsOn(int index, boolean on)
          Turns on or off the range value labels for specified range.
 void setRangeOn(int index, boolean on)
          Turns on or off the specified range.
 void setRangePosition(int index, int position)
          Sets the range position.
 void setRelativeRange(double range)
          Sets the upper range of the chart relative to the maximum value of the bars in the chart.
 void setRelativeRange(double range, double step)
          Sets the upper range of the chart relative to the maximum value of the bars in the chart.
 void setRelativeRange(int index, double range, double step)
          Sets the upper range of the chart relative to the maximum value of the bars in the chart.
 void setRightToLeftScrollingOn(boolean state)
          Turns on right to left scrolling when adding new values.
 void setSampleAxisRange(double min, double max)
          Sets the left and the right range of the chart.
 void setSampleScrollerOn(boolean on)
          Turns on or off the sample scroller.
 void setTargetLabelsPosition(int position)
          Sets the target labels position.
 void setTargetValueLine(java.lang.String id, double value, java.awt.Color color, int style, int range)
          Sets a target value line with the specified ID, value, and color.
 void setValueLinesColor(java.awt.Color color)
          Sets the color of the value lines in the chart.
 void setValueLinesOn(boolean on)
          Turns on or off the chart value lines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
Horizontal bar alignment.

See Also:
Constant Field Values

TARGET_LINE_ID_AND_VALUE_LABEL

public static final int TARGET_LINE_ID_AND_VALUE_LABEL
Use both the ID and value label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TARGET_LINE_ID_LABEL

public static final int TARGET_LINE_ID_LABEL
Use the ID label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TARGET_LINE_NO_LABEL

public static final int TARGET_LINE_NO_LABEL
Use no label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TARGET_LINE_VALUE_LABEL

public static final int TARGET_LINE_VALUE_LABEL
Use the value label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Vertical bar alignment.

See Also:
Constant Field Values
Constructor Detail

Grid

public Grid(GenericChart chart)
Creates the chart grid.

Method Detail

formatRangeNumber

public java.lang.String formatRangeNumber(int index,
                                          double value)
Formats a floating number to the number of decimals given for the specified range. The formatted number will have the integer part paired in three and three.

Parameters:
index - The range index.
value - The value to format.
Returns:
A string with the formatted number.

getCurrentLowerRange

public double getCurrentLowerRange(int range)
Gets the current lower range of the specified range.

Parameters:
range - The index of the range.
See Also:
setCurrentLowerRange(int, double)

getCurrentRange

public double getCurrentRange(int range)
Gets the current upper range of the specified range.

Parameters:
range - The index of the range
See Also:
setCurrentRange(int, double)

getGraphInsets

public java.awt.Insets getGraphInsets()
Gets the graph insets.

See Also:
setGraphInsets(int, int, int, int)

getGridAlignment

public int getGridAlignment()
Gets the bar alignment.

Returns:
HORIZONTAL or VERTICAL.
See Also:
setGridAlignment(int)

getGridLine

public double getGridLine(int index)
Gets grid lines positon value by its index.

Parameters:
index - The index of the line to get value from.
Returns:
A grid line position value.

getGridLineColor

public java.awt.Color getGridLineColor(int index)
Gets grid line's color value by it's index.

Parameters:
index - The index of the line to get color from.
Returns:
Grid line color of the given line.

getGridLineColors

public java.awt.Color[] getGridLineColors()
Gets the vertical grid lines colors.

Returns:
The array with grid lines colors.

getGridLines

public double[] getGridLines()
Gets the vertical grid lines positons.

Returns:
The array with grid lines position values, or null if not set.

getLowerRange

public double getLowerRange(int index)
Gets the lower value of the specified range.

Parameters:
index - The index of the range.

getMaxValueLineCount

public int getMaxValueLineCount()
Gets the current maxium number of value lines set.

Returns:
The count, or -1.
See Also:
setMaxValueLineCount(int)

getRange

public double getRange(int index)
Gets the upper value of the specified range.

Parameters:
index - The index of the range (0 or 1).

getRangeAdjusted

public int getRangeAdjusted(int adjuster)
Gets the range(s) adjusted by the specified adjuster.

Parameters:
adjuster - The index of the adjuster.
Returns:
The index of range adjusted by this adjuster, -1 = all ranges.

getRangeAdjusterPosition

public int getRangeAdjusterPosition()
Gets the position of the first range adjuster.

Returns:
0 for left, 1 for right.

getRangeColor

public java.awt.Color getRangeColor(int index)
Gets the color of the specified range.

Parameters:
index - The index of the range (0 or 1).

getRangeCount

public int getRangeCount()
Gets number of ranges used in the grid.

Returns:
Number of ranges.

getRangeDecimalCount

public int getRangeDecimalCount(int index)
Gets the number of decimals used in the range values.

Parameters:
index - The index of the range (0 or 1).

getRangeFormatter

public java.text.NumberFormat getRangeFormatter(int index)
Get the number formatter of this range.

Parameters:
index - The index of the range.
Returns:
The number formatter.

getRangeInterval

public double getRangeInterval(int range)
Gets the interval between the ticks on the specified range.

Parameters:
range - The index of the range.
Returns:
Interval between the range ticks.

getRangePosition

public int getRangePosition(int index)
Gets the range position.

Parameters:
index - The index of the range (0 or 1).
Returns:
0 for left, 1 for right.

getTargetLabelsPosition

public int getTargetLabelsPosition()
Gets the target labels position

Returns:
0 for left, 1 for right, -1 - the target labels are displayed on the same side as the range with index 0.

getTargetValueLine

public double getTargetValueLine(java.lang.String id)
Gets the value of a target value line.

Parameters:
id - The id of the target line.
Returns:
The value of the line.

getValueLinesColor

public java.awt.Color getValueLinesColor()
Gets the color of the value lines.


isDefaultGridLinesOn

public boolean isDefaultGridLinesOn()
Checks if the default vertical grid lines are on.

Returns:
True if on, false if off.

isGridAdjustmentOn

public boolean isGridAdjustmentOn(int edge)
Checks if runtime grid adjustment is on.

Parameters:
edge - TOP, LEFT, BOTTOM, or RIGHT.
Returns:
True if on, false if off.

isRangeAdjusterOn

public boolean isRangeAdjusterOn(int adjuster)
Checks if the specified range adjuster is turned on.

Parameters:
adjuster - The index of the adjuster (0 or 1)
Returns:
True if turned on, false otherwise.

isRangeLabelsOn

public boolean isRangeLabelsOn(int index)
Checks if the range labels are on or off.

Parameters:
index - The index of the range to check for.
Returns:
True for on, false for off.

isRangeOn

public boolean isRangeOn(int index)
Checks if the specified range is on.

Parameters:
index - The index of the range (0 or 1).
Returns:
True for on, false of off.

isRightToLeftScrollingOn

public boolean isRightToLeftScrollingOn()
Checks if the right to left scrolling is turned on.

Returns:
True if on, false if off.
See Also:
setRightToLeftScrollingOn(boolean)

isSampleScrollerOn

public boolean isSampleScrollerOn()
Checks if the sample scroller is turned on.

Returns:
True if turned on, false otherwise.

isValueLinesOn

public boolean isValueLinesOn()
Checks if the value lines are turned on.

Returns:
True for on, false for off.

reset

public void reset()
Resets the chart data and features.


setCurrentLowerRange

public void setCurrentLowerRange(int range,
                                 double lower)
Sets the current lower range of the specified range. The chart lower range will not be affected.

Parameters:
range - The index of the range .
lower - The range to use, larger or equal to the lower range.

setCurrentRange

public void setCurrentRange(int range,
                            double upper)
Sets the current upper range of the specified range. The full range of the chart will be unaffected.

Parameters:
range - The index of the range
upper - The range to use, less or equal to the full range.

setDefaultGridLinesColor

public void setDefaultGridLinesColor(java.awt.Color color)
Sets the color of the default vertical grid lines.

Parameters:
color - The color to set for default grid lines.

setDefaultGridLinesOn

public void setDefaultGridLinesOn(boolean on)
Turns on or off the default vertical grid lines. When calling this method, default grid lines are automatically set at the sample point positions for line chart and between the samples for bar chart.

Parameters:
on - True for on, false for off.
See Also:
setGridLines(double[])

setDefaultGridLinesOn

public void setDefaultGridLinesOn(boolean on,
                                  double start,
                                  double step)
Turns on or off the default vertical grid lines. When calling this method, the lines are shown from the start position and distance between the lines is set to step. The grid values are relative to the sample axis range (default 0 to 100).

Parameters:
on - True for on, false for off.
start - Position of the first line.
step - Distance between lines.
See Also:
setGridLines(double[])

setGraphInsets

public void setGraphInsets(int top,
                           int left,
                           int bottom,
                           int right)
Sets the insets between the graph itself and the chart component edges. Setting a value of -1 uses the default insets.

Parameters:
top - The top insets in pixels.
left - The left insets in pixels.
bottom - The bottom insets in pixels.
right - The right insets in pixels.

setGridAdjustmentOn

public void setGridAdjustmentOn(int edge,
                                boolean on)
Turns on or of runtime grid adjustment.

Parameters:
edge - TOP,LEFT,BOTTOM, or RIGHT.
on - True or on, false for off.

setGridAlignment

public void setGridAlignment(int alignment)
Sets the bar alignment. The default alignment is vertical.

Parameters:
alignment - HORIZONTAL or VERTICAL.
Throws:
java.lang.IllegalArgumentException - If the alignment is not valid.

setGridLine

public void setGridLine(int index,
                        double value)
Sets a single grid line value.

Parameters:
index - The index of the line to set value for.
value - The value to set.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

setGridLineColor

public void setGridLineColor(int index,
                             java.awt.Color color)
Sets a single grid line color.

Parameters:
index - The index of the line to set Color for.
color - The color to set for the grid line.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

setGridLineColors

public void setGridLineColors(java.awt.Color[] colors)
Sets the color of each vertical grid line.

Parameters:
colors - The array with grid lines colors.

setGridLines

public void setGridLines(double[] lines)
Sets the vertical grid lines positons. The grid values are relative to the sample axis range (default 0 to 100).

Parameters:
lines - The array with grid lines position values.
See Also:
setSampleAxisRange(double, double)

setGridLinesColor

public void setGridLinesColor(java.awt.Color color)
Sets the vertical grid lines color. If new grid lines are added, this method has to be called again

Parameters:
color - The color to set for all lines.

setLowerRange

public void setLowerRange(int index,
                          double range)
Sets the lower range of the chart. The lower range is the minimum value on the value axis, and the bars are adjusted according to this value.

Parameters:
index - The index of the range to set (0 or 1).
range - The range to set.
See Also:
setRange(int, double)

setLowerRelativeRange

public void setLowerRelativeRange(double range)
Sets the lower range of the chart relative to the current minimum value. If the lowest value is -1000, and the lower range is set to 1.5, the new lower range will then be -1500. If all the values are positive, the lower range will be set to 0.

Parameters:
range - The relative range;
See Also:
setLowerRelativeRange(double)

setLowerRelativeRange

public void setLowerRelativeRange(double range,
                                  double step)
Sets the lower range of the chart relative to the minimum value of the bars in the chart. The range will be divisible by the step value specified. If the minimum value is -987, and the relative range is set to 1.0 and the step is set to 100, the new range will be -1000, and the bars will be adjusted according to the new range. If all the values are positive, the lower range will be set to 0.

Parameters:
range - The relative range (0.0->);
step - The range will be divisible by this value.
See Also:
setLowerRelativeRange(double)

setLowerRelativeRange

public void setLowerRelativeRange(int index,
                                  double range,
                                  double step)
Sets the lower range of the chart relative to the minimum value of the bars in the chart. The range will be divisible by the step value specified. If the minimum value is -987, and the relative range is set to 1.0 and the step is set to 100, the new range will be -1000, and the bars will be adjusted according to the new range. If all the values are positive, the lower range will be set to 0.

Parameters:
index - The index of the range (0 or 1).
range - The relative range (0.0->);
step - The range will be divisible by this value.
See Also:
setLowerRelativeRange(double)

setMaxValueLineCount

public void setMaxValueLineCount(int count)
Sets the maximum number of value lines there should be in the chart. If set to -1, the number will be as many as there is room for.

Parameters:
count - The value line count.

setRange

public void setRange(int index,
                     double range)
Sets the upper value of the specified range. The upper range is the maximum value on the value axis, and the bars are adjusted according to this value. If you have any overlay charts added to this chart, the range of those charts will also be set.

Parameters:
index - The index of the range to set (0 or 1).
range - The range to set.
See Also:
setLowerRange(int, double)

setRangeAdjusted

public void setRangeAdjusted(int adjuster,
                             int range)
Sets which range(s) to be adjusted by the specified adjuster. By default adjuster 0 adjusts range 0 and son on.

Parameters:
adjuster - The index of the adjuster (0 or 1).
range - The range to be adjusted. -1 = all ranges.

setRangeAdjusterOn

public void setRangeAdjusterOn(int adjuster,
                               boolean on)
Turns on or off the range adjuster. When this is on, the user can adjust the range to see any low-value lines more clearly. This is only applicable for chart types with grids.

Parameters:
adjuster - The index of the adjuster (0 or 1)
on - True for on, false for off.

setRangeAdjusterPosition

public void setRangeAdjusterPosition(int position)
Sets the position of the first range adjuster. Per default the adjuster is set to opposite to the range side If there is only one range, else to the same side as the range.

Parameters:
position - 0 for left, 1 for right.

setRangeColor

public void setRangeColor(int index,
                          java.awt.Color color)
Sets the color of the specified range.

Parameters:
index - The index of the range (0 or 1).
color - The color to use for the range.

setRangeDecimalCount

public void setRangeDecimalCount(int index,
                                 int count)
Sets the number of decimals to use in the range label values.

Parameters:
index - The index of the range (0 or 1).
count - The number of decimals to use.

setRangeFormatter

public void setRangeFormatter(int index,
                              java.text.NumberFormat formatter)
Sets a number formatter for the specific range.

Parameters:
index - The index of the range.
formatter - The number formatter to set.

setRangeInterval

public void setRangeInterval(int range,
                             double interval)
Sets interval between the ticks on the specified range.

Parameters:
range - The index of the range.
interval - The interval between the to range ticks.

setRangeLabelsOn

public void setRangeLabelsOn(int index,
                             boolean on)
Turns on or off the range value labels for specified range. The labels are on by default.

Parameters:
index - The index of the range to turn on/off the labels for. If index == -1, the property is set for all ranges.
on - True for on, false for off.

setRangeOn

public void setRangeOn(int index,
                       boolean on)
Turns on or off the specified range.

Parameters:
index - The index of the range (0 or 1).
on - True for on, false of off.

setRangePosition

public void setRangePosition(int index,
                             int position)
Sets the range position.

Parameters:
index - The index of the range (0 or 1).
position - 0 for left, 1 for right

setRelativeRange

public void setRelativeRange(double range)
Sets the upper range of the chart relative to the maximum value of the bars in the chart. If the maximum value is 1000, and the upper range is set to 1.5, the new range will be 1500, and the bars will be adjusted according to the new range. If all the values are negative, the upper range will be set to 0. If all values are 0 or null, the range will be set to 100.

Parameters:
range - The relative range (0.0->);
See Also:
setRelativeRange(double, double)

setRelativeRange

public void setRelativeRange(double range,
                             double step)
Sets the upper range of the chart relative to the maximum value of the bars in the chart. The range will be divisible by the step value specified. If the maximum value is 987, and the relative range is set to 1.0 and the step is set to 100, the new range will be 1000, and the bars will be adjusted according to the new range. If all the values are negative, the upper range will be set to 0.

Parameters:
range - The relative range (0.0->);
step - The range will be divisible by this value.
See Also:
setRelativeRange(double)

setRelativeRange

public void setRelativeRange(int index,
                             double range,
                             double step)
Sets the upper range of the chart relative to the maximum value of the bars in the chart. The range will be divisible by the step value specified. If the maximum value is 987, and the relative range is set to 1.0 and the step is set to 100, the new range will be 1000, and the bars will be adjusted according to the new range. If all the values are negative, the upper range will be set to 0.

Parameters:
index - The index of the range to set (0 or 1).
range - The relative range (0.0->);
step - The range will be divisible by this value.
See Also:
setRelativeRange(double)

setRightToLeftScrollingOn

public void setRightToLeftScrollingOn(boolean state)
Turns on right to left scrolling when adding new values. Turning this on will paint a line with the right end of the line adjusted with the right edge of the chart grid. When a new value is appended, the line will scroll to the left (same as the CPU usage history in Windows).

Parameters:
state - True for on, false for off. Default is off.

setSampleAxisRange

public void setSampleAxisRange(double min,
                               double max)
Sets the left and the right range of the chart. All grid lines that fit into this period are shown on the chart. If this method is not used, default values are used. Default values are 0 for the left range and 100 for the right range.

Parameters:
min - The left range
max - The right range
Throws:
java.lang.IllegalArgumentException - if min more or equal than max.

setSampleScrollerOn

public void setSampleScrollerOn(boolean on)
Turns on or off the sample scroller. When this is on, the user can adjust the samples seen in the chart. This is only applicable for chart types with grids.

Parameters:
on - True for on, false for off.

setTargetLabelsPosition

public void setTargetLabelsPosition(int position)
Sets the target labels position.

Parameters:
position - 0 for left, 1 for right, -1 - the target labels will be displayed on the same side as the range with index 0.

setTargetValueLine

public void setTargetValueLine(java.lang.String id,
                               double value,
                               java.awt.Color color,
                               int style,
                               int range)
Sets a target value line with the specified ID, value, and color.

Parameters:
id - The id of the target line.
value - The value where the line should appear.
color - The color of the line, if null, the line is removed.
style - TARGET_LINE_NO_LABEL, TARGET_LINE_ID_LABEL, TARGET_LINE_VALUE_LABEL, or TARGET_LINE_ID_AND_VALUE_LABEL.
range - The range where the label will appear, and the value line is related to.
Throws:
java.lang.IllegalArgumentException - if the style is invalid.

setValueLinesColor

public void setValueLinesColor(java.awt.Color color)
Sets the color of the value lines in the chart.

Parameters:
color - The color to use.

setValueLinesOn

public void setValueLinesOn(boolean on)
Turns on or off the chart value lines. The value lines are displayed with intervals based on 1, 2, 2.5, and 5 (0.1, 0.2, 0.25, 0.5, 10, 20, 25, 50, 100, 200, 250, 500 and so on) and how many lines there is room for. You can set the maximum number of lines to be displayed with the setMaxValueLineCount.

Parameters:
on - True for on, false for off.
See Also:
setMaxValueLineCount(int)