Options
All
  • Public
  • Public/Protected
  • All
Menu

Chart modifier that turns pointer input into FreehandDrawingAnnotation instances.

While drawing is active, pointer-down creates a new annotation, pointer-move appends sampled points and pointer-up finalizes the stroke. The modifier can keep drawing mode active for repeated strokes, cap the maximum point count and simplify the finished path in screen space. It also activates the annotation interaction bypass so normal annotation hover and selection do not interfere while a stroke is being captured.

Hierarchy

  • ChartModifierBase2D
    • FreehandDrawingModifier

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: FreehandDrawing = ETradingChartModifierType.FreehandDrawing

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

executeCondition

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

isAnnotationInteractionBypassActive

  • get isAnnotationInteractionBypassActive(): boolean
  • Suppresses normal annotation selection/hover while this drawing tool is active.

    Returns boolean

isAttached

  • get isAttached(): boolean

isDrawing

  • get isDrawing(): boolean
  • Gets drawing mode state.

    Returns boolean

isEnabled

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

modifierType

  • get modifierType(): EModifierType

parentSurface

  • get parentSurface(): SciChartSurface

pointSamplingDistancePx

  • get pointSamplingDistancePx(): number
  • set pointSamplingDistancePx(value: number): void
  • Gets or sets freehand point sampling distance (CSS pixels). Lower values make smoother lines.

    Returns number

  • Gets or sets freehand point sampling distance (CSS pixels). Lower values make smoother lines.

    Parameters

    • value: number

    Returns void

receiveHandledEvents

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

secondaryExecuteCondition

  • get secondaryExecuteCondition(): TModifierExecuteCondition | undefined
  • set secondaryExecuteCondition(val: TModifierExecuteCondition | undefined): 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

onDetachSeries

  • onDetachSeries(rs: IRenderableSeries): void

onDetachSubSurface

  • onDetachSubSurface(subChart: ISciChartSubSurface): void

onParentSurfaceLayoutComplete

  • onParentSurfaceLayoutComplete(): void

onParentSurfaceRendered

  • onParentSurfaceRendered(): void

setParentSurface

  • setParentSurface(parentSurface: SciChartSurfaceBase): void

startDrawing

  • Starts drawing mode and optionally updates annotation options.

    Parameters

    Returns void

stopDrawing

  • stopDrawing(cancelCurrent?: boolean): void
  • Stops drawing mode. Set cancelCurrent=false to keep an in-progress stroke.

    Parameters

    • Default value cancelCurrent: 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