public class IlvScale
extends java.lang.Object
Scales might be defined as a graphical representation of a chart axis. As
such, a scale is always associated with an IlvAxis
instance. The axis to bind
to a scale is determined when a scale is added to a chart, using the
IlvChart#setXScale
and IlvChart#setYScale
methods.
A scale is composed of:
Here is a figure showing the different parts of a scale:
CSS example:
chartScale {
class : "ilog.views.chart.IlvScale";
annotations[0] : "@#ilvScaleAnnotation1";
annotations[1] : "@#ilvScaleAnnotation2";
autoCrossing : "false";
autoSide : "false";
autoWrapping : "false";
axisStroke : "@#stroke";
axisVisible : "false";
category : "false";
circleSide : "OUTSIDE";
crossingValue : "3.0";
drawOrder : "2";
foreground : "green";
labelAlignment : "LEFT";
labelColor : "green";
labelFont : "sansserif-BOLD-8";
labelOffset : "2";
labelRotation : "3.0";
labelVisible : "false";
majorTickSize : "2";
majorTickVisible : "false";
minorTickSize : "2";
minorTickVisible : "false";
radialSide : "LEFT";
side : "LOWER";
skipLabelMode : "CONSTANT";
skippingLabel : "false";
stepsDefinition : "@#ilvCategoryStepsDefinition";
tickLayout : "INSIDE";
title : "<value>";
titleFont : "sansserif-BOLD-8";
titleOffset : "2";
titlePlacement : "2";
titleRotation : "3.0";
visible : "false";
}
Modifier and Type | Property and Description |
---|---|
IlvScaleAnnotation[] |
annotations
Sets the annotations attached to this scale. |
boolean |
autoCrossing
Specifies whether the scale uses a default crossing location. |
boolean |
autoSide
Specifies whether the side of the labels, title and "outside" ticks should be chosen automatically. |
boolean |
autoWrapping
Toggles the automatic wrapping of step labels. |
Stroke |
axisStroke
Specifies the stroke for the axis and ticks. |
boolean |
axisVisible
Toggles the visibility of the axis. |
boolean |
category
Specifies that this scale should display categories. |
int |
circleSide
Sets the side where to place the labels, title, and "outside" ticks along the circular scale of a polar or radial chart. |
java.lang.String |
class
Creates a numeric scale with the step and substep units automatically computed. |
double |
crossingValue
Specifies where this scale crosses its dual axis. |
int |
drawOrder
Sets the drawing order of this scale. |
java.awt.Color |
foreground
Changes the color of the scale axis. |
int |
labelAlignment
Specifies the alignment of step labels. |
java.awt.Color |
labelColor
Changes the color used to display the step labels. |
java.awt.Font |
labelFont
Sets the font used to draw the step labels. |
int |
labelOffset
Specifies the offset between tick marks and labels. |
double |
labelRotation
Specifies the rotation of the step labels. |
boolean |
labelVisible
Toggles the visibility of step labels. |
int |
majorTickSize
Specifies the size of major tick marks. |
boolean |
majorTickVisible
Toggles the visibility of major ticks. |
int |
minorTickSize
Specifies the size of minor tick marks. |
boolean |
minorTickVisible
Toggles the visibility of minor ticks. |
int |
radialSide
Sets the side where to place the labels, title, and "outside" ticks along the radial scale of a polar or radial chart. |
int |
side
Sets the side where to place the labels, title, and "outside" ticks. |
int |
skipLabelMode
Specifies how the scale determines the labels to skip. |
boolean |
skippingLabel
Tells the scale to skip step labels when they overlap. |
IlvStepsDefinition |
stepsDefinition
Changes the steps definition. |
int |
tickLayout
Specifies the layout of tick marks. |
java.lang.String |
title
Sets the scale title text. |
java.awt.Font |
titleFont
Sets the title font. |
int |
titleOffset
Specifies the offset between the scale title and the step labels. |
int |
titlePlacement
Sets the title placement. |
double |
titleRotation
Sets the title rotation. |
boolean |
visible
Toggles the visibility of this scale. |
Note: Label wrapping does not check the orientation nor the
type of the scale. Similarly, it does not take into account the rotation
of scale labels. It should only be enabled for scales whose labels
are parallel to the axis.
CSS example:
autoWrapping : "false";
public Stroke axisStroke
axisStroke : "@#stroke";
BasicStroke
for an example of implementing an axisStroke.public boolean axisVisible
axisVisible : "false";
public boolean category
category : "false";
public int circleSide
CSS example:
circleSide : "OUTSIDE";
Allowed values: | ||
OUTSIDE |
Circular scale side (x scale in polar or radar chart): Labels, title, and "outside" ticks are drawn outside the circle. | |
INSIDE |
Circular scale side (x scale in polar or radar chart): Labels, title, and "outside" ticks are drawn inside the circle. |
public double crossingValue
Note: The bean property "crossingValue" must not be specified
together with the bean properties "autoCrossing" or "crossing".
CSS example:
crossingValue : "3.0";
#3D
public int drawOrder
drawOrder : "2";
public java.awt.Color foreground
foreground : "green";
public int labelAlignment
SwingConstants.LEFT
: left alignment.SwingConstants.CENTER
(default): centered alignment.SwingConstants.RIGHT
: right alignment.labelAlignment : "LEFT";
Allowed values: | ||
LEFT |
Box-orientation constant used to specify the left side of a box. | |
CENTER |
The central position in an area. Used for both compass-direction constants (NORTH, etc.) and box-orientation constants (TOP, etc.). | |
RIGHT |
Box-orientation constant used to specify the right side of a box. |
public java.awt.Color labelColor
labelColor : "green";
public java.awt.Font labelFont
labelFont : "sansserif-BOLD-8";
public int labelOffset
3
.
labelOffset : "2";
public double labelRotation
labelRotation : "3.0";
public boolean labelVisible
labelVisible : "false";
public int majorTickSize
6
.
majorTickSize : "2";
public boolean majorTickVisible
majorTickVisible : "false";
public int minorTickSize
3
.
minorTickSize : "2";
public boolean minorTickVisible
minorTickVisible : "false";
public int radialSide
CSS example:
radialSide : "LEFT";
Allowed values: | ||
LEFT |
Radial scale side (y scale in polar or radar chart): Labels, title, and "outside" ticks are drawn to the left of the radial scale. | |
RIGHT |
Radial scale side (y scale in polar or radar chart): Labels, title, and "outside" ticks are drawn to the right of the radial scale. |
public int side
Note: The bean property "side" must not be specified
together with the bean property "autoSide".
CSS example:
side : "LOWER";
Allowed values: | ||
LOWER |
Side: Labels, title, and "outside" ticks are drawn towards decreasing values of the dual axis. | |
UPPER |
Side: Labels, title, and "outside" ticks are drawn towards increasing values of the dual axis. |
public int skipLabelMode
skipLabelMode : "CONSTANT";
Allowed values: | ||
CONSTANT |
Skip label type: indicates that the scale computes a constant number of labels to skip to avoid overlapping. | |
ADAPTIVE |
Skip label type: indicates that the scale considers every label from the first to the last, and determines which one should be skipped to avoid overlapping. |
public boolean skippingLabel
skippingLabel : "false";
public IlvStepsDefinition stepsDefinition
stepsDefinition : "@#ilvCategoryStepsDefinition";
IlvCategoryStepsDefinition
for an example of implementing a stepsDefinition.public int tickLayout
tickLayout : "INSIDE";
Allowed values: | ||
INSIDE |
Tick layout type: ticks are drawn inside the plot area. | |
OUTSIDE |
Tick layout type: ticks are drawn outside the plot area. | |
CROSS |
Tick layout type: ticks are drawn both inside and outside the plot area. |
public java.lang.String title
title : "<value>";
public java.awt.Font titleFont
titleFont : "sansserif-BOLD-8";
public int titleOffset
3
.
titleOffset : "2";
public int titlePlacement
0
meaning the title is drawn
at the minimum axis value, 100
meaning the title is drawn at the
maximum axis value. The default value is 50
, meaning the title is
drawn in the middle of the scale.
titlePlacement : "2";
public double titleRotation
titleRotation : "3.0";
title
public boolean visible
visible : "false";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.