Options
All
  • Public
  • Public/Protected
  • All
Menu

The DataPointSelectionModifier provides an ability to select data points on a 2D SciChartSurface within SciChart - High Performance JavaScript Charts

remarks

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/

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Object literals

Constructors

constructor

Properties

Protected activePointerEvents

activePointerEvents: Map<number, ModifierMouseArgs> = new Map()

Stores info about active pointerdown events

allowClickSelect

allowClickSelect: boolean

When true, allow single click to select a data-point. Also see allowDragSelect for the option to drag to select multiple points

remarks

Default value is TRUE

allowDragSelect

allowDragSelect: boolean

When true, allow dragging a rectangle to select multiple data-points. Also see allowClickSelect for the option to click to select a single point

remarks

Default value is TRUE

Protected changedPropertiesList

changedPropertiesList: string[] = []

Protected endPoint

endPoint: Point

hitTestRadius

hitTestRadius: number = BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS

hit test radius for single point selection

Readonly id

id: string

A unique Id for the IChartModifierBase

includedSeries

includedSeries: IncludedItems = new IncludedItems()

The helper property to get and set the list of included renderable series

includedXAxes

includedXAxes: IncludedItems = new IncludedItems()

The helper property to get and set the list of included X axes

includedYAxes

includedYAxes: IncludedItems = new IncludedItems()

The helper property to get and set the list of included Y axes

invalidateParentCallback

invalidateParentCallback: () => void

A callback to invalidate the parent SciChartSurfaceBase

Type declaration

    • (): void
    • Returns void

Protected isAttachedProperty

isAttachedProperty: boolean

Protected isEnabledProperty

isEnabledProperty: boolean = true

modifierGroup

modifierGroup: string | undefined

Specifies a string ID to group modifiers.

remarks

When one receives a mouse event, all modifiers in the same group receive the event.

Protected mousePoint

mousePoint: Point | undefined

Protected parentSurfaceProperty

parentSurfaceProperty: SciChartSurface

Protected previousPoint

previousPoint: Point | undefined

Protected receiveHandledEventsProperty

receiveHandledEventsProperty: boolean

Protected secondaryExecuteConditionProperty

secondaryExecuteConditionProperty: TModifierExecuteCondition | undefined

Readonly selectionChanged

selectionChanged: EventHandler<DataPointSelectionChangedArgs> = new EventHandler<DataPointSelectionChangedArgs>()

A selection-changed EventHandler. See EventHandler for how to subscribe to and be notified when any Series is selected or unselected

Protected selectionRect

selectionRect: RubberBandSvgRect

Protected startPoint

startPoint: Point

Readonly type

type: EChart2DModifierType = EChart2DModifierType.DataPointSelection

Protected typeMap

typeMap: Map<string, string> = new Map<string, string>()

Protected xAxisIdProperty

xAxisIdProperty: string | undefined

Protected xAxisProperty

xAxisProperty: AxisBase2D | undefined

xyDirection

xyDirection: EXyDirection = EXyDirection.XyDirection

Direction to which the modifier can be applied

Protected yAxisIdProperty

yAxisIdProperty: string | undefined

Protected yAxisProperty

yAxisProperty: AxisBase2D | undefined

Accessors

canReceiveMouseEvents

  • get canReceiveMouseEvents(): boolean
  • When true, this modifier can receive mouse events

    inheritdoc

    Returns boolean

executeCondition

isAttached

  • get isAttached(): boolean

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(isEnabled: boolean): void
  • When true, the modifier is enabled

    inheritdoc

    Returns boolean

  • When true, the modifier is enabled

    inheritdoc

    Parameters

    • isEnabled: boolean

    Returns void

modifierType

parentSurface

receiveHandledEvents

  • get receiveHandledEvents(): boolean
  • set receiveHandledEvents(receiveHandledEvents: boolean): void
  • When true, this modifier should receive events which have been handled by modifiers higher up in the call hierachy.

    inheritdoc

    Returns boolean

  • When true, this modifier should receive events which have been handled by modifiers higher up in the call hierachy.

    inheritdoc

    Parameters

    • receiveHandledEvents: boolean

    Returns void

secondaryExecuteCondition

selectedDataPoints

  • An array of currently selected series which can be observed by subscribing to the selectionChanged event handler

    remarks

    See documentation for how to subscribe to changes

    Returns DataPointInfo[]

selectionFill

  • get selectionFill(): string
  • set selectionFill(selectionFill: string): void
  • Gets or sets the fill of the selection rect when the user drags on the chart

    Returns string

  • Gets or sets the fill of the selection rect when the user drags on the chart

    Parameters

    • selectionFill: string

    Returns void

selectionStroke

  • get selectionStroke(): string
  • set selectionStroke(selectionStroke: string): void
  • Gets or sets the stroke of the selection rect when the user drags on the chart

    Returns string

  • Gets or sets the stroke of the selection rect when the user drags on the chart

    Parameters

    • selectionStroke: string

    Returns void

selectionStrokeThickness

  • get selectionStrokeThickness(): number
  • set selectionStrokeThickness(selectionStrokeThickness: number): void
  • Gets or sets the strokeThickness of the selection rect when the user drags on the chart

    Returns number

  • Gets or sets the strokeThickness of the selection rect when the user drags on the chart

    Parameters

    • selectionStrokeThickness: number

    Returns void

xAxis

xAxisId

  • get xAxisId(): string
  • set xAxisId(xAxisId: string): void
  • inheritdoc

    Returns string

  • inheritdoc

    Parameters

    • xAxisId: string

    Returns void

yAxis

yAxisId

  • get yAxisId(): string
  • set yAxisId(yAxisId: string): void
  • inheritdoc

    Returns string

  • inheritdoc

    Parameters

    • yAxisId: string

    Returns void

Methods

addSelectedDataPoint

  • 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.

    Parameters

    • rs: IRenderableSeries

      The renderable series containing the data point

    • index: number

      The index of the data point in the series

    • Optional value: DataPointInfo

      Optional DataPointInfo object. If not provided, a new one will be created from the series metadata

    Returns void

applyTheme

checkExecuteCondition

checkExecuteConditions

  • checkExecuteConditions(args: ModifierMouseArgs): { isPrimary: boolean | undefined; isSecondary: boolean | undefined }
  • Checks execute primary and secondary conditions

    Parameters

    Returns { isPrimary: boolean | undefined; isSecondary: boolean | undefined }

    • isPrimary: boolean | undefined
    • isSecondary: boolean | undefined

clearSelectedDataPoints

  • clearSelectedDataPoints(): void
  • 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.

    Returns void

delete

  • delete(): void

Protected deselectAllPoints

  • deselectAllPoints(invalidate?: boolean): void
  • Deselects all points

    Parameters

    Returns void

Protected getAllSeries

getIncludedRenderableSeries

  • 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 IRenderableSeries[]

getIncludedXAxis

getIncludedYAxis

Protected getIsActionAllowed

Protected getSelectionMode

Protected growBy

  • Grows the Axis by a fraction around the mouse point

    Parameters

    • mousePoint: Point

      the X,Y location of the mouse at the time of the operation

    • axis: AxisBase2D

      the Axis to grow or shrink

    • fraction: number

      the fraction, e.g. 0.1 grows the axis by 10%

    Returns void

includeAllAxes

  • includeAllAxes(): void

includeSeries

  • Includes renderable series. Returns True if the included items list has changed after the operation.

    Parameters

    Returns boolean

includeXAxis

  • includeXAxis(axis: AxisBase2D, isIncluded: boolean): void
  • Includes or excludes X axis

    Parameters

    Returns void

includeYAxis

  • includeYAxis(axis: AxisBase2D, isIncluded: boolean): void
  • Includes or excludes Y axis

    Parameters

    Returns void

linkAxes

  • linkAxes(): void
  • inheritdoc

    Returns void

modifierDoubleClick

modifierDrop

modifierMouseDown

modifierMouseEnter

modifierMouseLeave

modifierMouseMove

modifierMouseUp

modifierMouseWheel

modifierPointerCancel

Protected notifyPropertyChanged

  • notifyPropertyChanged(propertyName: string): void

onAttach

  • onAttach(): void

onAttachSeries

onAttachSubSurface

onDetach

  • onDetach(): void

onDetachSeries

onDetachSubSurface

onParentSurfaceLayoutComplete

  • onParentSurfaceLayoutComplete(): void

onParentSurfaceRendered

  • onParentSurfaceRendered(): void

raiseSelectionChanged

  • raiseSelectionChanged(invalidate: boolean): void
  • 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.

    Parameters

    • invalidate: boolean

      When true, forces a redraw of the parent SciChartSurface after raising the event

    Returns void

removeSelectedDataPoint

  • Removes a data point from the selection. The data point will be removed from the internal selection map.

    Parameters

    • rs: IRenderableSeries

      The renderable series containing the data point

    • index: number

      The index of the data point in the series to remove from selection

    Returns void

removeSelectedDataPointsForSeries

  • Removes all selected data points for a specific renderable series from the selection. This is useful when a series is being removed or detached.

    Parameters

    • rs: IRenderableSeries

      The renderable series for which to remove all selected data points

    Returns void

Protected selectManyPoints

  • Selects all points inside the Rect, according to the ESelectionMode passed in

    Parameters

    Returns void

selectPoint

  • 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.

    Parameters

    Returns void

Protected selectSinglePoint

  • Performs selection of a single point with the desired ESelectionMode

    Parameters

    Returns void

setParentSurface

Protected testPropertyChanged

  • testPropertyChanged(propertyName: string): boolean

toJSON

  • toJSON(): { options: {}; type: string }

Protected updatePointerInfo

Object literals

Protected executeConditionProperty

executeConditionProperty: object

button

button: MouseLeftButton = EExecuteOn.MouseLeftButton

Generated using TypeDoc