Creates an instances of DataPointSelectionModifier
Optional parameters of type IDataPointSelectionModifierOptions used to configure the modifier
Stores info about active pointerdown events
When true, allow single click to select a data-point. Also see allowDragSelect for the option to drag to select multiple points
When true, allow dragging a rectangle to select multiple data-points. Also see allowClickSelect for the option to click to select a single point
hit test radius for single point selection
A unique Id for the IChartModifierBase
The helper property to get and set the list of included renderable series
The helper property to get and set the list of included X axes
The helper property to get and set the list of included Y axes
A callback to invalidate the parent SciChartSurfaceBase
Specifies a string ID to group modifiers.
A selection-changed EventHandler. See EventHandler for how to subscribe to and be notified when any Series is selected or unselected
Direction to which the modifier can be applied
When true, this modifier can receive mouse events
The primary action execute condition that modifier should respond to
The primary action execute condition that modifier should respond to
When true, the modifier is attached to a SciChartSurfaceBase
When true, the modifier is enabled
When true, the modifier is enabled
The type of Chart Modifier, see EModifierType for a list of values
When true, this modifier should receive events which have been handled by modifiers higher up in the call hierachy.
When true, this modifier should receive events which have been handled by modifiers higher up in the call hierachy.
The secondary action execute condition that modifier should respond to
The secondary action execute condition that modifier should respond to
An array of currently selected series which can be observed by subscribing to the selectionChanged event handler
Gets or sets the fill of the selection rect when the user drags on the chart
Gets or sets the fill of the selection rect when the user drags on the chart
Gets or sets the stroke of the selection rect when the user drags on the chart
Gets or sets the stroke of the selection rect when the user drags on the chart
Gets or sets the strokeThickness of the selection rect when the user drags on the chart
Gets or sets the strokeThickness of the selection rect when the user drags on the chart
Adds an already selected data point to the internal selection map. This allows the point to be deselected later. To select and add an unselected point by index, call the selectPoint method. This does not fire the selectedChanged event. If you want to do that, call the raiseSelectionChanged method.
The renderable series containing the data point
The index of the data point in the series
Optional DataPointInfo object. If not provided, a new one will be created from the series metadata
Applies a theme (defined by IThemeProvider) to the current element
The theme data to apply
Checks execute condition
Checks execute primary and secondary conditions
Clears all selected data points from the selection. This removes all data points from the internal selection map and marks that the selection has changed.
Deselects all points
When true (default=true) raise selectionChanged event and redraw the parent SciChartSurface
Gets all series on the parent surface.
Returns all visible and included renderable series. The list also contains included visible stacked renderable series This calls this.testIsIncludedSeries so it is best to customise the including check behaviour there.
Returns the list of included X axes
Returns the list of included Y axes
Checks if event conditions should trigger the modifier action
current event info as ModifierMouseArgs
Gets the current ESelectionMode to use - e.g. Union, Replace - depending on TModifierKeys and if the selection is area selection or not. This function can be overridden by the IDataPointSelectionModifierOptions.getSelectionMode
The TModifierKeys e.g. if Ctrl, Shift or Alt are pressed
When true, the user has selected a rectangle or area, not clicked a single point
Grows the Axis by a fraction around the mouse point
the X,Y location of the mouse at the time of the operation
the Axis to grow or shrink
the fraction, e.g. 0.1 grows the axis by 10%
Includes all X and Y axes
Includes renderable series. Returns True if the included items list has changed after the operation.
Includes or excludes X axis
Includes or excludes Y axis
Called when the modifier is attached to a parent SciChartSurfaceBase
Called when a RenderableSeries is attached to this modifier
Called when a SciChartSubSurface} is attached to the parent SciChartSurface
Called when the modifier is detached from a parent SciChartSurfaceBase
Called when a RenderableSeries is detached from this modifier
Called when a SciChartSubSurface is detached from the parent SciChartSurface
Called when the parent SciChartSurfaceBase is rendered
Raises the selection changed event if the selection has changed since the last time this method was called. This will notify all subscribers of the selectionChanged event and optionally invalidate the parent surface.
When true, forces a redraw of the parent SciChartSurface after raising the event
Removes a data point from the selection. The data point will be removed from the internal selection map.
The renderable series containing the data point
The index of the data point in the series to remove from selection
Removes all selected data points for a specific renderable series from the selection. This is useful when a series is being removed or detached.
The renderable series for which to remove all selected data points
Selects all points inside the Rect, according to the ESelectionMode passed in
This programmatically selects a data point by setting isSelected true on the metadata at the given index and then adding the point to the modifier's selected point list. This does not fire the selectedChanged event. If you want to do that, call the raiseSelectionChanged method.
Performs selection of a single point with the desired ESelectionMode
Sets the parent SciChartSurfaceBase on this modifier
Generated using TypeDoc
The DataPointSelectionModifier provides an ability to select data points on a 2D SciChartSurface within SciChart - High Performance JavaScript Charts
To apply the DataPointSelectionModifier to a SciChartSurface and add data selection behavior, use the following code:
const sciChartSurface: SciChartSurface; sciChartSurface.chartModifiers.add(new DataPointSelectionModifier());📚 Docs: https://www.scichart.com/documentation/js/v4/2d-charts/chart-modifier-api/selection/data-point-selection/