Options
All
  • Public
  • Public/Protected
  • All
Menu

The RubberBandXyZoomModifier provides drag-rectangle to zoom behavior on a 2D SciChartSurface within SciChart - High Performance JavaScript Charts

remarks

To apply the RubberBandXyZoomModifier to a SciChartSurface and add drag to zoom behavior, use the following code:

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

Animation of the zoom may be controlled via the RubberBandXyZoomModifier.isAnimated, RubberBandXyZoomModifier.animationDuration and RubberBandXyZoomModifier.easingFunction properties.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected activePointerEvents

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

Stores info about active pointerdown events

animationDuration

animationDuration: number = 400

Defines the duration of animations when zooming in milliseconds

Protected changedPropertiesList

changedPropertiesList: string[] = []

easingFunction

easingFunction: TEasingFn = easing.outExpo

Defines the easing function for animation. See TEasingFn for a range of functions

Protected executeOnProperty

executeOnProperty: EExecuteOn = EExecuteOn.MouseLeftButton

Readonly id

id: string

A unique Id for the IChartModifierBase

invalidateParentCallback

invalidateParentCallback: () => void

A callback to invalidate the parent SciChartSurfaceBase

Type declaration

    • (): void
    • Returns void

isAnimated

isAnimated: boolean = true

When true, the Zoom operations are animated. See also animationDuration and easingFunction

Protected isAttachedProperty

isAttachedProperty: boolean

Protected isClicked

isClicked: boolean = false

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 pointFrom

pointFrom: Point | undefined

Protected pointTo

pointTo: Point | undefined

Protected previousPoint

previousPoint: Point | undefined

Protected receiveHandledEventsProperty

receiveHandledEventsProperty: boolean

rubberBandRect

rubberBandRect: RubberBandSvgRect | undefined

Readonly type

type: RubberBandXYZoom = EChart2DModifierType.RubberBandXYZoom

Protected typeMap

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

Protected xAxisIdProperty

xAxisIdProperty: string = AxisCore.DEFAULT_AXIS_ID

xyDirection

xyDirection: EXyDirection = EXyDirection.XyDirection

Protected yAxisIdProperty

yAxisIdProperty: string = AxisCore.DEFAULT_AXIS_ID

Static Readonly MIN_DRAG_SENSITIVITY

MIN_DRAG_SENSITIVITY: 5 = 5

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

fill

  • get fill(): string
  • set fill(value: string): void
  • Get the fill color for RubberBandSvgRect

    Returns string

  • Set the fill color for RubberBandSvgRect

    Parameters

    • value: string

    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

stroke

  • get stroke(): string
  • set stroke(value: string): void
  • Get the stroke for RubberBandSvgRect

    Returns string

  • Set the stroke for RubberBandSvgRect

    Parameters

    • value: string

    Returns void

strokeThickness

  • get strokeThickness(): number
  • set strokeThickness(value: number): void
  • Get the stroke thickness for RubberBandSvgRect

    Returns number

  • Set the stroke thickness for RubberBandSvgRect

    Parameters

    • value: number

    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

Protected calculateDraggedDistance

  • calculateDraggedDistance(): number
  • Returns number

delete

  • delete(): void

Protected getAllSeries

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

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 performZoom

  • performZoom(pointFrom: Point, pointTo: Point): void
  • Performs the zoom operation on the parent Surface, using the mouse points from & to, which define the corners of the rectangle to zoom

    Parameters

    • pointFrom: Point

      the first corner of the rectangle to zoom

    • pointTo: Point

      the second corner of the rectangle to zoom

    Returns void

Protected performZoomOnAxis

  • performZoomOnAxis(axis: AxisBase2D, fromCoord: number, toCoord: number): void
  • Performs a Zoom on a specific axis

    Parameters

    • axis: AxisBase2D

      the Axis to zoom

    • fromCoord: number

      the coordinate to zoom from

    • toCoord: number

      the coordinate to zoom to

    Returns void

setParentSurface

Protected testPropertyChanged

  • testPropertyChanged(propertyName: string): boolean

toJSON

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

Protected updatePointerInfo

Protected updateRubberBandRect

  • updateRubberBandRect(): void
  • Returns void

Generated using TypeDoc