Options
All
  • Public
  • Public/Protected
  • All
Menu

Pointer-driven annotation eraser.

A simple click erases once at the click location. A drag samples a temporary freehand trail while repeatedly hit-testing and removing annotations under the pointer. The modifier can either remove the top-most hit annotation or every annotation hit at a sampled point.

Hierarchy

  • ChartModifierBase2D
    • AnnotationEraserModifier

Implements

  • IDeletable
  • IChartModifierBase

Index

Constructors

constructor

Properties

Protected activePointerEvents

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

Stores info about active pointerdown events

Protected changedPropertiesList

changedPropertiesList: string[] = []

Readonly id

id: string
inheritdoc

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
inheritdoc

Type declaration

    • (): void
    • Returns void

Protected isAttachedProperty

isAttachedProperty: boolean

Protected isEnabledProperty

isEnabledProperty: boolean = true

modifierGroup

modifierGroup: string | undefined
inheritdoc

Protected mousePoint

mousePoint: Point | undefined

Protected parentSurfaceProperty

parentSurfaceProperty: SciChartSurface

Protected previousPoint

previousPoint: Point | undefined

Protected receiveHandledEventsProperty

receiveHandledEventsProperty: boolean

Protected secondaryExecuteConditionProperty

secondaryExecuteConditionProperty: TModifierExecuteCondition | undefined

Readonly type

type: AnnotationEraser = ETradingChartModifierType.AnnotationEraser

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

dragStartThresholdPx

  • get dragStartThresholdPx(): number
  • set dragStartThresholdPx(value: number): void
  • Gets or sets the click-to-drag threshold in CSS pixels.

    Returns number

  • Gets or sets the click-to-drag threshold in CSS pixels.

    Parameters

    • value: number

    Returns void

executeCondition

  • get executeCondition(): TModifierExecuteCondition
  • set executeCondition(condition: TModifierExecuteCondition): void

isAnnotationInteractionBypassActive

  • get isAnnotationInteractionBypassActive(): boolean
  • Suppresses normal annotation selection/hover while the eraser is active.

    Returns boolean

isAttached

  • get isAttached(): boolean

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(isEnabled: boolean): void

isErasing

  • get isErasing(): boolean
  • Gets erasing mode state.

    Returns boolean

modifierType

  • get modifierType(): EModifierType

parentSurface

  • get parentSurface(): SciChartSurface

receiveHandledEvents

  • get receiveHandledEvents(): boolean
  • set receiveHandledEvents(receiveHandledEvents: boolean): void

secondaryExecuteCondition

  • get secondaryExecuteCondition(): TModifierExecuteCondition | undefined
  • set secondaryExecuteCondition(val: TModifierExecuteCondition | undefined): void

strokeCursor

  • get strokeCursor(): ECursorStyle | string
  • set strokeCursor(value: ECursorStyle | string): void
  • Gets or sets the cursor shown while a stroke is active.

    Returns ECursorStyle | string

  • Gets or sets the cursor shown while a stroke is active.

    Parameters

    • value: ECursorStyle | string

    Returns void

xAxis

  • get xAxis(): AxisBase2D | undefined

xAxisId

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

yAxis

  • get yAxis(): AxisBase2D | undefined

yAxisId

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

Methods

applyTheme

  • applyTheme(themeProvider: IThemeProvider): void

checkExecuteCondition

  • checkExecuteCondition(args: ModifierMouseArgs, condition: TModifierExecuteCondition | undefined): boolean | undefined

checkExecuteConditions

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

    Parameters

    • args: ModifierMouseArgs

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

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

delete

  • delete(): void

Protected getAllSeries

  • getAllSeries(): IRenderableSeries[]

getIncludedRenderableSeries

  • getIncludedRenderableSeries(): IRenderableSeries[]
  • 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

  • getIncludedXAxis(): AxisBase2D[]

getIncludedYAxis

  • getIncludedYAxis(): AxisBase2D[]

Protected getIsActionAllowed

  • getIsActionAllowed(args: ModifierMouseArgs): boolean
  • Checks if event conditions should trigger the modifier action

    remarks

    Can be used in some of the modifiers to add/override constraints

    Parameters

    • args: ModifierMouseArgs

      current event info as {@link ModifierMouseArgs}

    Returns boolean

Protected growBy

  • growBy(mousePoint: Point, axis: AxisBase2D, fraction: number): void
  • 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

  • includeSeries(series: IRenderableSeries, isIncluded: boolean): boolean
  • Includes renderable series. Returns True if the included items list has changed after the operation.

    Parameters

    • series: IRenderableSeries
    • isIncluded: boolean

    Returns boolean

includeXAxis

  • includeXAxis(axis: AxisBase2D, isIncluded: boolean): void

includeYAxis

  • includeYAxis(axis: AxisBase2D, isIncluded: boolean): void

linkAxes

  • linkAxes(): void

modifierDoubleClick

  • modifierDoubleClick(args: ModifierMouseArgs): void

modifierDrop

  • modifierDrop(args: ModifierMouseArgs): void

modifierMouseDown

  • modifierMouseDown(args: ModifierMouseArgs): void

modifierMouseEnter

  • modifierMouseEnter(args: ModifierMouseArgs): void

modifierMouseLeave

  • modifierMouseLeave(args: ModifierMouseArgs): void

modifierMouseMove

  • modifierMouseMove(args: ModifierMouseArgs): void

modifierMouseUp

  • modifierMouseUp(args: ModifierMouseArgs): void

modifierMouseWheel

  • modifierMouseWheel(args: ModifierMouseArgs): void

modifierPointerCancel

  • modifierPointerCancel(args: ModifierMouseArgs): void

Protected notifyPropertyChanged

  • notifyPropertyChanged(propertyName: string): void

onAttach

  • onAttach(): void

onAttachSeries

  • onAttachSeries(rs: IRenderableSeries): void

onAttachSubSurface

  • onAttachSubSurface(subChart: ISciChartSubSurface): void

onDetach

  • onDetach(): void
  • inheritdoc

    Returns void

onDetachSeries

  • onDetachSeries(rs: IRenderableSeries): void

onDetachSubSurface

  • onDetachSubSurface(subChart: ISciChartSubSurface): void

onParentSurfaceLayoutComplete

  • onParentSurfaceLayoutComplete(): void

onParentSurfaceRendered

  • onParentSurfaceRendered(): void

setParentSurface

  • setParentSurface(parentSurface: SciChartSurfaceBase): void

startErasing

  • Starts erasing mode and optionally updates eraser settings.

    Parameters

    Returns void

stopErasing

  • stopErasing(cancelCurrentTrail?: boolean): void
  • Stops erasing mode. Set cancelCurrentTrail=false to keep the active trail alive.

    Parameters

    • Default value cancelCurrentTrail: boolean = true

    Returns void

Protected testPropertyChanged

  • testPropertyChanged(propertyName: string): boolean

toJSON

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

    Returns { options: {}; type: string }

    • options: {}
    • type: string

Protected updatePointerInfo

  • updatePointerInfo(args: ModifierMouseArgs): void

Object literals

Protected executeConditionProperty

executeConditionProperty: object

button

button: MouseLeftButton = EExecuteOn.MouseLeftButton

Generated using TypeDoc