Using the Charts Library > Scales Display > Adding a Scale Displayer in a Chart
 
Adding a Scale Displayer in a Chart
A chart uses one abscissa scale and as many ordinate scales as you want. The type of scales that can be used for a given chart depends on the type of the projection used in the chart.
The following table shows the scales that can be used with a Cartesian chart:
Chart type
Cartesian
Projection used
Cartesian
Scale Displayers:
    
    Abscissa Coordinate
    
    
    Ordinate Coordinate(s)
    
    
Rectangular
    
Rectangular
The following table shows the scales that can be used with a polar chart:
Chart type
Polar
Projection used
Polar
Scale Displayers:
    
    Abscissa Coordinate
    
    
    Ordinate Coordinate(s)
    
    
    
Circular
    
Rectangular
If the chart that you have created is an instance of the IlvChartGraphic class, no scale displayers are created by default.
If the chart that you have created is an instance of a subclass of the IlvChartGraphic class (that is, IlvCartesianChart or IlvPolarChart), two scale displayers are already created by default (one for the abscissa coordinate and one for the main ordinate coordinate):
*Two IlvRectangularScaleDisplayer objects are created by default for an IlvCartesianChart object.
*One IlvCircularScaleDisplayer object and one IlvRectangularScaleDisplayer object are created by default for an IlvPolarChart object.
The following method is available to set by hand the abscissa scale displayer of a given chart:
virtual void setAbscissaScale(IlvSingleScaleDisplayer* scale)
Similarly, several methods are available to set by hand the ordinate scale displayer(s) that you want to be used by a given chart.
*To add an ordinate scale displayer, use the following method:
void addOrdinateScale(IlvAbstractScaleDisplayer* scale)
The ordinate scale displayer is added at the end of the list of the ordinate scale displayers that are already defined, if any.
*To insert an ordinate scale at a given index in the list of ordinate scale displayers that are already defined, use the following method:
virtual void insertOrdinateScale(IlvAbstractScaleDisplayer* scale,
IlvUInt index = 0)
*To set the ordinate scale displayer at a given index in the list of ordinate scale displayers, use the following method:
virtual void setOrdinateScale(IlvUInt index,
IlvAbstractScaleDisplayer* scale)
If a scale displayer is already defined at this index, this scale displayer is replaced by the new one.
Note: When several ordinate scale displayers are defined for a given chart, the corresponding scales are drawn in the order of the indexes.

Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.