Options
All
  • Public
  • Public/Protected
  • All
Menu

The ZoomPanModifier provides drag to pan behavior on a 2D SciChartSurface as well as pinch zoom behavior on touchscreen devices within SciChart - High Performance JavaScript Charts

remarks

To apply the ZoomPanModifier to a SciChartSurface and add drag to pan behavior, use the following code:

const sciChartSurface: SciChartSurface;
sciChartSurface.chartModifiers.add(new ZoomPanModifier());

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected activePointerEvents

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

Stores info about active pointerdown events

Protected changedPropertiesList

changedPropertiesList: string[] = []

enableZoom

enableZoom: boolean = false

Sets whether to enable pinch zoom behavior of SciChartSurface on touchscreen devices

Protected executeOnProperty

executeOnProperty: EExecuteOn = EExecuteOn.MouseLeftButton

horizontalGrowFactor

horizontalGrowFactor: number = 0.005

Defines the sensitivity of zooming in horizontal direction

Readonly id

id: string

A unique Id for the IChartModifierBase

Protected includedXAxisMap

includedXAxisMap: Map<string, boolean> = new Map<string, boolean>()

Protected includedYAxisMap

includedYAxisMap: Map<string, boolean> = new Map<string, boolean>()

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

Readonly type

Protected typeMap

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

verticalGrowFactor

verticalGrowFactor: number = 0.005

Defines the sensitivity of zooming in vertical direction

Protected xAxisIdProperty

xAxisIdProperty: string = AxisCore.DEFAULT_AXIS_ID

xyDirection

xyDirection: EXyDirection = EXyDirection.XyDirection

Protected yAxisIdProperty

yAxisIdProperty: string = AxisCore.DEFAULT_AXIS_ID

Accessors

canReceiveMouseEvents

  • get canReceiveMouseEvents(): boolean

executeOn

  • The operation that modifier should respond to

    inheritdoc

    Returns EExecuteOn

  • The operation that modifier should respond to

    inheritdoc

    Parameters

    Returns void

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

xAxisId

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

    Returns string

  • inheritdoc

    Parameters

    • xAxisId: string

    Returns void

yAxisId

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

    Returns string

  • inheritdoc

    Parameters

    • yAxisId: string

    Returns void

Methods

applyTheme

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

Protected getAllSeries

getIncludedXAxis

getIncludedYAxis

Protected getIsActionAllowed

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

includeXAxis

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

includeYAxis

  • includeYAxis(axis: AxisBase2D, isIncluded: boolean): 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

onParentSurfaceRendered

  • onParentSurfaceRendered(): void

Protected performModifierAction

Protected performZoom

  • performZoom(mousePoint: Point, horizontalPinchDelta: number, verticalPinchDelta: number, horizontalGrowFactor: number, verticalGrowFactor: number): void
  • Performs the zoom operation around the mouse point

    Parameters

    • mousePoint: Point

      The X,Y location of the mouse at the time of the zoom

    • horizontalPinchDelta: number

      horizontal pinch delta

    • verticalPinchDelta: number

      vertical pinch delta

    • horizontalGrowFactor: number
    • verticalGrowFactor: number

    Returns void

Protected removeFromActiveTouchEvents

setParentSurface

Protected testPropertyChanged

  • testPropertyChanged(propertyName: string): boolean

toJSON

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

Protected updatePointerInfo

Generated using TypeDoc