Interface definition for a callback to be invoked when the current series and data point tracking information has changed as a result of a user gesture.
Implement this listener when you want to change the default behavior of
the tooltip, such as how it is positioned and or how its content is
displayed. The default update behavior of the tooltip's content can be
replicated by calling
updateTooltipContent(Tooltip, DataPoint) allowing its
position to be changed without affecting its content.
Defines how the Tooltip reacts to a change in series and data point tracking information as a result of a user gesture.
Defines how the Tooltip reacts to a change in series and data point
tracking information as a result of a user gesture. This could be,
for example, setting the Tooltip's center position and updating its
setCenter(Data) must be called with a
Data at some point within this method.
The first parameter,
tooltip, is the
update as a result of the user gesture. The series that is being
tracked can be obtained by calling
and from this the axes and chart, and therefore crosshair, can also
The second parameter,
dataPoint, is a copy of the closest
data point from the tracked series' data adapter. The definition of
closest depends on the various configurable settings on the
Crosshair such as its Mode.
dataPoint will hold information
about whether the corresponding data point in the series' data
adapter is selected or not. It can also be safely cast to a
MultiValueDataPoint if, and only if, the corresponding actual
data point that is being tracked implements the
The third parameter,
dataPointPosition, represents an (X, Y)
value on the tracked series' axes that corresponds to the visual
dataPoint. Note, this is the visual
position because a data point may not necessarily be placed at
its (X, Y) data values, such as when a series is stacked.
The fourth parameter,
represents an (X, Y) value on the tracking series' axes that
corresponds to an interpolated position between two data points. This
value will be
null when the tooltip is tracking a series that
does not support interpolation or that has interpolation switched
LineSeries is the only series that supports
interpolatedDataPointPosition cannot be cast to a
MultiValueDataPoint in any circumstances.
|tooltip||the tooltip to update as a result of the tracking info change from the user gesture|
|dataPoint||a copy of the corresponding data point closest to the user gesture|
|dataPointPosition||a representation of the visual position, in
data terms, of
|interpolatedDataPointPosition||a representation of the visual position, in data terms, of the interpolated data point closest to the user gesture, null if interpolation is not supported by the series or switched off by the crosshair|