Charts > Using the Charts Library > Scales Display > Drawing the Scales of a Chart > Setting General Properties
 
Setting General Properties
The following properties are defined for all the scale displayers:
Property
Methods
Default Value
Scale Positioning Properties
Fixed to a Position
   
   
   
Fixed to a Data Value
isFixedToPosition
getRelativePosition
setRelativePosition
   
getCrossingValue
setCrossingValue
IlvTrue
IlvMinDataPosition
   
   
0
 
Scale Display Properties
Visibility
isVisible
setVisible
IlvTrue
   
Drawing Order Relative
to the Drawing of the
Graphical Representations
of Data
getDrawOrder
setDrawOrder
IlvDrawAbove
   
Must Always Appear in
the Data Display Area
isAlwaysVisible
setAlwaysVisible
IlvFalse
   
Miscellaneous
Name
getName
setName
0
   
Flags
getFlags
setFlags
0
   
Defining the Position of a Scale
A scale can be fixed either to a position or to a data value:
*Fixing a scale to a position
This can be done by means of the setRelativePosition method. The position at which a scale is fixed is defined by an offset from the position at which the minimum or the maximum data value is displayed.
For example, the following code line fixes the position of the scale to an offset of -10 pixels from the position at which the minimum data value is displayed:
scaleDisplayer->setRelativePosition(IlvMinDataPosition, -10);
The following code line fixes the position of the scale to the position at which the maximum data value is displayed:
scaleDisplayer->setRelativePosition(IlvMaxDataPosition);
*Fixing a scale to a data value of another scale
This can be done by means of the setCrossingValue method. You have to specify the scale and the data value of this scale to which you want to fix the position of the current scale. If the current scale is the abscissa scale, the other scale must be an ordinate scale. If the current scale is an ordinate scale, the other scale must be the abscissa scale.
The following code line fixes the position of the scale displayed by the scale displayer scaleDisplayer to the data value 2.0 on the scale displayed by the scale displayer otherScaleDisplayer.
scaleDisplayer->setCrossingValue(2.0, otherScaleDisplayer);
If a scale is fixed to a data value that does not belong to the range of visible data, the scale will not appear on the screen. However, if the property “Must Always Appear in the Data Display Area” is set to IlvTrue, the range of visible data will be automatically modified so that the scale can appear on the screen.
Note: By default, a scale is fixed to the position at which the minimum data value is displayed.
Defining the Drawing Order Relative to the Drawing of the Graphical Representations of Data
A scale can be displayed on top of (IlvDrawAbove) or underneath (IlvDrawBelow) the graphical representations of data in a chart. By default, a scale will be displayed on top of the graphical representations. However, the drawing order can be changed for a given scale by means of the setDrawOrder method.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.