skip to main content
Gantt > Programmer's documentation > Developing with the JViews Charts SDK > Scales > General Properties
 
General Properties
The following properties are defined in the IlvScale class to control the global visual aspect of a scale.
Property
Methods
Default value
Axis representation stroke
getAxisStroke
setAxisStroke
BasicStroke of 1 pixel wide
Axis representation visibility
isAxisVisible
setAxisVisible
true
Crossing value
getCrossingValue
setCrossingValue
setCrossing
IlvAxis.MIN_VALUE or IlvAxis.MAX_VALUE.
Title
getTitle
setTitle
null
Scale Visibility
isVisible
setVisible
true
Major tick size
getMajorTickSize
setMajortTickSize
6
Minor tick size
getMinorTickSize
setMinorTickSize
3
Major tick visibility
isMajorTickVisible
setMajorTickVisible
true
Minor tick visibility
isMinorTickVisible
setMinorTickVisible
true
Position of the ticks
getTickLayout
setTickLayout
IlvScale.TICK_OUTSIDE
Axis representation stroke
The stroke used to draw the graphical representation of the axis is defined by the axisStroke property. The graphical representation of the axis can be either a line or an arc, depending on the current projection and the axis attached to the scale. A scale attached to the x-axis of a Cartesian chart is drawn as a horizontal line, while a scale attached to the x-axis of a polar chart is drawn as an arc.
Position of a scale
The position of a scale is defined with respect to the scale dual axis according to a given data value. This data value is the value on the dual axis where the scale axis crosses it, and is called the scale crossing value.
For example, in a default Cartesian chart, the x-scale crossing value is set to IlvAxis.MIN_VALUE, meaning that the value where the x-scale crosses the y-axis is equal to the minimum value of the y-axis.
Title of a scale
A scale can have an optional title. A scale title is specified as a string by means of the setTitle method.
A scale title supports the following features:
*It can be rotated by a given angle.
This rotation angle can be specified either when the text title is initialized or later by means of the setRotation method.
*It is placed anywhere along the scale axis at a given position.
This position is expressed as a percentage of the axis length, and can be set using the setTitlePlacement method.
Visibility of a scale
The visibility of the scale is defined by the axisVisible property. Depending on the value of this property, the axis representation can be visible or hidden. Showing or hiding a scale affects the drawing area bounds, therefore a layout is automatically performed on the chart area when the value changes.
NOTE Setting the property to false hides only the axis, it does not affect the scale ticks visibility.
Size of the major and minor ticks
The size of the major and minor ticks is expressed in pixels and can be changed dynamically using the setMajorTickSize and setMinorTickSize methods.
The major tick visibility and minor tick visibility are defined by the majorTickVisible and minorTickVisible properties. Showing or hiding scale ticks affects the scale bounds and the drawing area bounds, therefore a layout is automatically performed on the chart area when these properties change.
Position of the ticks relative to the axis
The position of the ticks relative to the axis is defined by the tickLayout property. The following positions are possible:
*TICK_INSIDE
The ticks extend inside the data plotting area.
*TICK_OUTSIDE
The ticks extend outside the data plotting area.
*TICK_CROSS
The ticks cross the axis and extend both inside and outside the data plotting rectangle.
NOTE By default, the position of the ticks of a scale is set to TICK_OUTSIDE and can be changed using the setTickLayout method.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.