Class ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>Abstract

Cursor-based visual that can be plotted on a Chart. Like Cursors its built of two parts: PointMarker and ResultTable, first of which shows the location of the Marker clearly and the second to display information about the pointed DataPoint.

Type Parameters

  • PointMarkerType extends PointMarker = PointMarker

  • ResultTableBackgroundType extends UIBackground = UIBackground

  • CursorType extends InternalStaticCursor<PointMarkerType, ResultTableBackgroundType> = InternalStaticCursor<PointMarkerType, ResultTableBackgroundType>

Hierarchy

  • ChartMarker

Implements

Properties

renderingScale: LinearScaleXY
scale: ScaleXY<ViewportScale1D>

Methods

  • Permanently destroy the component.

    To fully allow Garbage-Collection to free the resources used by the component, make sure to remove any references to the component and its children in application code.

    let chart = ...ChartXY()
    let axisX = chart.getDefaultAxisX()
    // Dispose Chart, and remove all references so that they can be garbage-collected.
    chart.dispose()
    chart = undefined
    axisX = undefined

    Returns

    Object itself for fluent interface

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Get is auto-fit enabled. Affects logic of automatic fitting of Cursors ResultTable to the screen.

    Returns

    Boolean flag whether auto-fit is enabled

    Returns boolean

  • Get PointMarker object. PointMarker is a visual that is displayed at the Cursors position

    Returns

    PointMarker object

    Returns PointMarkerType

  • Get current position of Annotation

    Returns

    Position on Annotations scale

    Returns Point

  • Get ResultTable object. ResultTable is a visual that displays currently pointed data next to its location

    Returns

    ResultTable object

    Returns ResultTable<ResultTableBackgroundType>

  • Get element visibility.

    Returns

    true when element is set to be visible and false otherwise.

    Returns boolean

  • Returns

    True if object is attached or not attachable, false if it is not attached and attachable

    Returns boolean

  • Remove event listener from dispose event.

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • This event is called whenever the position of the Marker is changed

    Returns

    True if unsubscription was successful.

    Parameters

    • token: Token

      Token that was received when the subscription was created.

    Returns boolean

  • Remove event listener from visibleStateChanged

    Parameters

    • token: Token

    Returns boolean

  • This event is called whenever the Marker is disposed

    Returns

    Token that can be used to unsubscribe from the event.

    Parameters

    • handler: (() => unknown)

      Function that is called when event is triggered.

        • (): unknown
        • Returns unknown

    Returns Token

  • This event is called whenever the position of the Marker is changed

    Returns

    Token that can be used to unsubscribe from the event.

    Parameters

    • handler: ((marker: ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>, position: Point) => void)

      Function that is called when event is triggered.

        • (marker: ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>, position: Point): void
        • Parameters

          • marker: ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>
          • position: Point

          Returns void

    Returns Token

  • Register new event listener to visibleStateChanged event.

    Parameters

    • listener: VisibleStateChangedHandler<ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>>

      Event listener for visibleStateChanged

    Returns Token

  • Points the Marker at a given CursorPoint. Updating its position and displayed data.

    Parameters

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set auto-fit strategy of Cursor. Affects logic of automatic fitting of Cursors ResultTable to the screen.

    Returns

    Object itself for fluent interface

    Parameters

    • Optional autoFitStrategy: AutoFitStrategyFactory<ResultTableBackgroundType>

      AutoFitStrategy factory or undefined to disable auto-fitting

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set dragging mode of object. Defines how the object can be dragged by mouse.

    See UIDraggingModes collection for options.

    Returns

    Object itself

    Parameters

    • draggingMode: UIDraggingModes = UIDraggingModes.notDraggable

      DraggingMode or undefined to disable dragging

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set mouse interactions enabled or disabled

    Returns

    Object itself for fluent interface

    Parameters

    • state: boolean

      Specifies state of mouse interactions

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Mutator function for PointMarker. PointMarker is a visual that is displayed at the Cursors position

    Returns

    Object itself for fluent interface

    Parameters

    • mutator: Mutator<PointMarkerType>

      Mutator function for PointMarker

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set visibility mode for PointMarker. PointMarker is a visual that is displayed at the Cursors position.

    Returns

    Object itself

    Parameters

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set the position of Annotation on its scale.

    Parameters

    • position: Point

      Position on Annotations scale.

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Mutator function for ResultTable. ResultTable is a visual that displays currently pointed data next to its location

    Returns

    Object itself for fluent interface

    Parameters

    • mutator: Mutator<ResultTable<ResultTableBackgroundType>>

      Mutator function for ResultTable

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set visibility mode for ResultTable. ResultTable is a visual that displays currently pointed data next to its location. NOTE: ResultTable is only visible when it has displayable content, regardless of its VisibilityMode!

    Returns

    Object itself

    Parameters

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>

  • Set element visibility.

    Returns

    Object itself.

    Parameters

    • state: boolean

      true when element should be visible and false when element should be hidden.

    Returns ChartMarker<PointMarkerType, ResultTableBackgroundType, CursorType>