Automatic Scroll Modes
A chart object can display either predefined data or real-time data (data arriving “on the fly”). The way a given chart object reacts when new data are added is defined by a value of type IlvChartGraphic::ScrollMode. Three scroll modes have been predefined:
*IlvScrollModeStop
When new data items are added, the chart does not scroll. The new data items that are added are displayed only if they belong to the data display area.
*IlvScrollModeShift
When a new data item is added, the chart scrolls if the data item is out of the displayed range of the abscissa coordinate. The scrolling operation is performed along the abscissa scale in the direction of the decreasing values. When the chart scrolls, it shifts by the number of scroll ratios necessary to display the new data item in the data display area. (Chart before the Scrolling Operation in Shift Scroll Mode and Chart after Scrolling by the Scroll Ratio in Shift Scroll Mode show examples of a chart that uses shift scroll mode.)
*IlvScrollModeCycle
When a new data item is added, the chart scrolls if the data item is out of the displayed range of the abscissa coordinate. In the case of cycle mode, when a new data item is added that is out of the displayed range of the abscissa coordinate, this data item is simply displayed in the area where the minimum values are displayed, thus erasing these values. So the data is displayed cyclically as it arrives. When the chart scrolls, it scrolls by the number of scroll ratios necessary to display the data item in the data display area.
When you create a chart object, the scroll mode that is set by default is IlvScrollModeStop. You can change the scroll mode with the IlvChartGraphic::setScrollMode method. If the new scroll mode is set to IlvScrollModeCycle, you can also specify that a scrolling cursor that marks the beginning of the cycle should be displayed as well. Do this by setting the parameter createCursor of the IlvChartGraphic::setScrollMode method to IlvTrue.
When you create a chart object, the scroll ratio is set to 0.25 by default. This means that the portion of the chart that is scrolled corresponds to a quarter of the range of the abscissa coordinate. You can change the scroll ratio by means of the IlvChartGraphic::setScrollRatio method. The scroll ratio should be between 0 and 1.
Published date: 05/24/2022
Last modified date: 02/24/2022