Enum Class PlotTracking
- All Implemented Interfaces:
IPropCnrChoiceOption<IPlotChoiceOption>, IPlotChoiceOption, Serializable, Comparable<PlotTracking>, Constable
The tracking indicator of a plot: a line that follows the pointer or the finger over the plot area, with the value of each tracked series at that position as a label beside the series' point (dojox
action2d/MouseIndicator and action2d/TouchIndicator). Each series of the plot is tracked unless its SeriesOption.TRACKED is off; the look follows the chart theme (with ChartTheme.IIZI the IIZI tokens: line --iz-fg2, label box --iz-div on --iz-bg2, text --iz-fg); PlotOption.TRACKING_VERTICAL, PlotOption.TRACKING_FIXED, PlotInteger.TRACKING_PRECISION and PlotOption.TRACKING_NAMES shape it.With a mouse, HOVER follows the pointer as it moves and DRAG while a button is held. With a finger both follow the finger while it touches the plot: a finger has no hover. While a finger tracks, the page does not scroll from the chart, and a tap without a move still reaches the chart as a click (see ChartOption.CLICK_EVENTS). The tracking is the client's: nothing is sent to the server.
Only a plot with axes tracks (lines, areas, markers, columns, bars, scatter...): a pie, a spider and an indicator plot do not.
Example, a line chart whose two series are labeled with their names as the mouse moves:
Plot2D plot=chart.getDefaultPlot(); plot.set(PlotTracking.HOVER); plot.set(PlotOption.TRACKING_NAMES,true); plot.set(PlotInteger.TRACKING_PRECISION,1);
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe indicator follows the mouse pointer while a mouse button is held down over the plot area, and the finger while it touches the plot area.The indicator follows the mouse pointer as it moves over the plot area, and the finger while it touches the plot area.No tracking indicator, the default.Method Summary
Modifier and TypeMethodDescriptionGets all the choices possible, including default.Gets the default value.intgetInt()Returns the choice as an integer value.Gets the property name.static PlotTrackingReturns the enum constant of this class with the specified name.static PlotTracking[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
OFF
No tracking indicator, the default.HOVER
The indicator follows the mouse pointer as it moves over the plot area, and the finger while it touches the plot area. It goes when the pointer leaves the chart or the finger is lifted.DRAG
The indicator follows the mouse pointer while a mouse button is held down over the plot area, and the finger while it touches the plot area.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
getDefault
Gets the default value. This value is used to initialize the property.- Specified by:
getDefaultin interfaceIPropCnrChoiceOption<IPlotChoiceOption>- Returns:
OFF.
enumValues
Gets all the choices possible, including default.- Specified by:
enumValuesin interfaceIPropCnrChoiceOption<IPlotChoiceOption>
getInt
public int getInt()Returns the choice as an integer value.- Specified by:
getIntin interfaceIPropCnrChoiceOption<IPlotChoiceOption>
getPropName
Gets the property name.- Specified by:
getPropNamein interfaceIPropCnrChoiceOption<IPlotChoiceOption>