Options
All
  • Public
  • Public/Protected
  • All
Menu

The RolloverModifier provides tooltip and cursor behavior on a 2D SciChartSurface within SciChart - High Performance JavaScript Charts

remarks

To apply the RolloverModifier to a SciChartSurface and add tooltip behavior, use the following code:

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

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected absoluteXCoord

absoluteXCoord: number = 0

Protected activePointerEvents

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

Stores info about active pointerdown events

Protected changedPropertiesList

changedPropertiesList: string[] = []

Protected executeOnProperty

executeOnProperty: EExecuteOn = EExecuteOn.MouseLeftButton

hitTestRadius

hitTestRadius: number = 0

If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line

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

Protected isAttachedProperty

isAttachedProperty: boolean

Protected isEnabledProperty

isEnabledProperty: boolean = true

Protected Readonly legendAnnotation

legendAnnotation: RolloverLegendSvgAnnotation | undefined

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 mousePosition

mousePosition: EMousePosition = EMousePosition.OutOfCanvas

Protected parentSurfaceProperty

parentSurfaceProperty: SciChartSurface

Protected previousPoint

previousPoint: Point | undefined

Protected receiveHandledEventsProperty

receiveHandledEventsProperty: boolean

Readonly rolloverLineAnnotation

rolloverLineAnnotation: LineAnnotation | undefined

Protected showRolloverLineProperty

showRolloverLineProperty: boolean = true

Protected showTooltipProperty

showTooltipProperty: boolean = true

snapToDataPoint

snapToDataPoint: boolean = false

Gets or sets the snapToDataPoint flag. If True the RolloverModifier line snaps to the nearest data-point of the first visible renderable series

tooltipLegendOffsetX

tooltipLegendOffsetX: number = 0

Gets or sets the legend X offset

tooltipLegendOffsetY

tooltipLegendOffsetY: number = 0

Gets or sets the legend Y offset

Optional tooltipLegendTemplate

tooltipLegendTemplate: TRolloverLegendSvgTemplate

Gets or sets the template for the legend

Readonly type

type: Rollover = EChart2DModifierType.Rollover

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

Accessors

allowTooltipOverlapping

  • get allowTooltipOverlapping(): boolean
  • set allowTooltipOverlapping(value: boolean): void
  • Gets or Sets if tooltips for multiple series are allowed to overlap. Default false

    Returns boolean

  • Gets or Sets if tooltips for multiple series are allowed to overlap. Default false

    Parameters

    • value: boolean

    Returns void

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

placementDivId

  • get placementDivId(): string
  • set placementDivId(value: string): void
  • Gets or sets the parent div element reference or id for the Tooltip

    Returns string

  • Gets or sets the parent div element reference or id for the Tooltip

    Parameters

    • value: string

    Returns void

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

rolloverLineStroke

  • get rolloverLineStroke(): string
  • set rolloverLineStroke(rolloverLineStroke: string): void
  • Gets or Sets the color of the vertical rollover line as an html color code

    Returns string

  • Gets or Sets the color of the vertical rollover line as an html color code

    Parameters

    • rolloverLineStroke: string

    Returns void

rolloverLineStrokeDashArray

  • get rolloverLineStrokeDashArray(): number[]
  • set rolloverLineStrokeDashArray(rolloverLineStrokeDashArray: number[]): void
  • Gets or Sets the dash array of the vertical rollover line

    Returns number[]

  • Gets or Sets the dash array of the vertical rollover line

    Parameters

    • rolloverLineStrokeDashArray: number[]

    Returns void

rolloverLineStrokeThickness

  • get rolloverLineStrokeThickness(): number
  • set rolloverLineStrokeThickness(rolloverLineStrokeThickness: number): void
  • Gets or Sets the thickness of the vertical rollover line

    Returns number

  • Gets or Sets the thickness of the vertical rollover line

    Parameters

    • rolloverLineStrokeThickness: number

    Returns void

showRolloverLine

  • get showRolloverLine(): boolean
  • set showRolloverLine(showRolloverLine: boolean): void
  • Gets or Sets whether to show the vertical rollover line. Default true

    Returns boolean

  • Gets or Sets whether to show the vertical rollover line. Default true

    Parameters

    • showRolloverLine: boolean

    Returns void

showTooltip

  • get showTooltip(): boolean
  • set showTooltip(value: boolean): void
  • Gets or Sets whether to show the tooltip. Default true

    Returns boolean

  • Gets or Sets whether to show the tooltip. Default true

    Parameters

    • value: boolean

    Returns void

tooltipDataTemplate

  • Gets or Sets the tooltipDataTemplate, which allows you to customize content for the tooltip

    Returns TRolloverTooltipDataTemplate

  • Gets or Sets the tooltipDataTemplate, which allows you to customize content for the tooltip

    Parameters

    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

Protected CalculateTooltipPositions

  • CalculateTooltipPositions(tooltipArray: TTooltipProps[], allowTooltipOverlapping: boolean, spacing: number, seriesViewRect: Rect, pixelRatio: number, isVerticalChart?: boolean): TTooltipProps[]
  • Called internally to adjust the positions of tooltips if there are overlaps, or if it is a vertical chart

    Parameters

    • tooltipArray: TTooltipProps[]
    • allowTooltipOverlapping: boolean
    • spacing: number
    • seriesViewRect: Rect
    • pixelRatio: number
    • Default value isVerticalChart: boolean = false

    Returns TTooltipProps[]

    TTooltipProps[]

Protected addLineAnnotationToSurface

  • addLineAnnotationToSurface(): void
  • Returns void

Protected addSeriesAnnotationsToParentSurface

  • Parameters

    Returns void

applyTheme

Protected createLine

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

getIncludedRenderableSeries

Protected getIsActionAllowed

getMousePosition

  • Returns current mouse position

    Returns EMousePosition

Protected getRolloverProps

Protected getRolloverProps1

Protected getSeriesInfos

  • Returns SeriesInfo[]

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

hitTestRenderableSeries

  • Override hitTestRenderableSeries and add a custom logic

    Parameters

    Returns HitTestInfo

includeSeries

Protected isVerticalChart

  • isVerticalChart(): boolean
  • Returns boolean

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 removeSeriesAnnotationsFromParentSurface

  • Parameters

    Returns void

setParentSurface

Protected testPropertyChanged

  • testPropertyChanged(propertyName: string): boolean

toJSON

  • toJSON(): { options: {}; type: string }
  • Convert the object to a definition that can be serialized to JSON, or used directly with the builder api

    Returns { options: {}; type: string }

    • options: {}
    • type: string

Protected update

  • update(): void
  • Returns void

Protected updateLine

  • updateLine(): void
  • Returns void

Protected updatePointerInfo

Protected updateSeriesAnnotations

  • updateSeriesAnnotations(): void
  • description

    Update Markers and Tooltips

    Returns void

Generated using TypeDoc