Defining the Minimum and Maximum Data Values Represented by a Scale
The minimum and maximum data values that are represented by a scale are stored in the coordinate information object associated with the coordinate represented by the scale.
This coordinate information object can be obtained by means of the
getCoordinateInfo method of the scale displayer. It can also be accessed directly at the level of the chart without passing through the scale displayer. You can use the following methods to access the object at the level of the chart:
IlvChartGraphic::getOrdinateInfo for the ordinate coordinate(s)
By default, the minimum and maximum data values represented by a scale are computed automatically so that all the data points that are displayed by considering this scale can appear within the interval defined by the minimum and maximum data values. However, the minimum and maximum data values that are represented by a scale can be defined by using one of the following methods on the coordinate information object associated with the scale:
The minimum and maximum data values that are actually represented by a given scale, whether they are computed automatically or set by hand, are obtained by means of the following methods on the coordinate information object associated with the scale:
For example, the following code lines set 1 and 4 as the minimum and maximum data values represented by the main ordinate scale of a chart. This means that the data points that have to be displayed by considering this scale and that are outside of the interval defined by these minimum and maximum data values will not be displayed.
IlvAbstractScaleDisplayer* ordinateScale = chart->getOrdinateScale(); IlvChartCoordinateInfo* ordinateInfo = ordinateScale->getCoordinateInfo(); ordinateInfo->setUserDataRange(IlvCoordInterval(1, 4)); |
Published date: 05/24/2022
Last modified date: 02/24/2022