Charts > Using the Charts Library > Interacting with Charts > Using the Chart Interactors
 
Using the Chart Interactors
The base class used to define the behavior of a chart in response to a given action by the user is the IlvChartInteractor class.
Several subclasses are predefined in the Charts Library. Some of these subclasses inherit directly from the IlvChartInteractor class:
*IlvChartZoomInteractor allows the user to zoom in and zoom out on the data display area.
*IlvChartScrollInteractor allows the user to scroll the displayed data by using the arrow keys.
*IlvChartPanInteractor allows the user to scroll the displayed data by using the mouse.
*IlvChartCrossHairInteractor displays a crosshair at the location of the mouse pointer.
Other subclasses inherit from the IlvChartDataInteractor class, a subclass of IlvChartInteractor that specifically deals with interactions on the data points of the chart:
*IlvChartDragPointInteractor allows the user to drag a data point.
*IlvChartHighlightPointInteractor allows the user to trigger an action whenever the mouse moves over a data point in the data display area.
*IlvChartInfoViewInteractor inherits from the IlvChartHighlightPointInteractor class and displays information about a data point whenever the mouse moves over the data point in the data display area.
*IlvChartSelectInteractor allows the user to select data points (either all the data points of a data set or only a single data point) and then to trigger an action on the selected data point(s).
Note: The precision that is currently used to find the data point corresponding to a given screen point is returned by the IlvChartDataInteractor::GetPrecision method. This precision can be changed by means of the IlvChartDataInteractor::SetPrecision method.
Instances of the chart interactors can be either shared or individually instantiated. Shared instances are stored in a register and can be accessed by their registered name.
Note: Only shared chart interactor instances are persistent. The nonshared instances that you have instantiated individually are saved as if they were the shared instance of the same chart interactor class.
Predefined Chart Interactors
The following sections describe the chart interactors of the Charts Library. For each chart interactor, you will find a table that includes the registered name of the shared instance of the interactor, the key or button used for the interaction, and the action that is performed when using the interactor.
The following interactors are defined in the Charts Library:
*Zoom Interactor
*Scroll Interactor
*Pan Interactor
*Crosshair Interactor
*Drag-Point Interactor
*Highlight-Data-Point Interactor
*Information-View Interactor
*Select-Data-Points Interactor

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