Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

The interface describing a LineAnnotation

Hierarchy

Implemented by

Index

Properties

adornerClipping

adornerClipping: string | EAnnotationClippingMode

The clipping mode of the annotation adorners

annotationLayer

annotationLayer: EAnnotationLayer
description

The layer to place the annotation on. See EAnnotationLayer for a list of values

remarks

applicable only to WebGL annotations

annotationsGripsFill

annotationsGripsFill: string

The fill color for the adorner drag handle

annotationsGripsRadius

annotationsGripsRadius: number

The radius of the adorner drag handle

annotationsGripsStroke

annotationsGripsStroke: string

The stroke color for the adorner drag handle

axisFontFamily

axisFontFamily: string

Gets the axisFontSize for the LineAnnotation

axisFontSize

axisFontSize: number

Gets the axisFontSize for the LineAnnotation

axisLabelFill

axisLabelFill: string

Gets the axisLabelFill for the LineAnnotation

axisLabelStroke

axisLabelStroke: string

Gets the axisLabelStroke for the LineAnnotation

checkIsWithinBounds

checkIsWithinBounds: (args: ModifierMouseArgs) => boolean

Calculates if pointer is within entity bounds

Type declaration

clipping

clipping: string | EAnnotationClippingMode

The clipping mode of the annotation

getRenderLayer

getRenderLayer: () => number

Type declaration

    • (): number
    • Returns number

getRenderNextTo

getRenderNextTo: () => { offset: number; renderable: IOrderedRenderable | string } | undefined

Type declaration

getRenderOrder

getRenderOrder: () => number

An explicit position for this item to render within the layer. By default, items will render in the order they were added to the collection. Items with a renderOrder set will be inserted at the desired position.

Type declaration

    • (): number
    • Returns number

getSurfaceRenderOrder

getSurfaceRenderOrder: () => number

Allows a series to be treated as if it was drawn on a surface with a different draw order than its actual parent surface Until the chart is rendered, the get method will only return a value if one has been explicitly set.

Type declaration

    • (): number
    • Returns number

hover

hover: (options: IHoverOptions) => void

Executes a hover action on the annotation if it is hit

Type declaration

hovered

hovered: EventHandler<any>

Fires based on hover rules passed into hover

Readonly id

id: string

A unique Id for the IAnnotation

invalidateParentCallback

invalidateParentCallback: (options?: { force?: boolean; svgOnly?: boolean }) => void
description

callback which notifies the parent SciChartSurface it's time to draw

Type declaration

    • (options?: { force?: boolean; svgOnly?: boolean }): void
    • Parameters

      • Optional options: { force?: boolean; svgOnly?: boolean }
        • Optional force?: boolean
        • Optional svgOnly?: boolean

      Returns void

Readonly isDomAnnotation

isDomAnnotation: boolean
description

defines if the annotation is rendered as HTMLElement or on WebGL Canvas via RenderContext

readonly

Check for other versions that are drawn with alternative approaches if needed

isDraggingStarted

isDraggingStarted: boolean

isEditable

isEditable: boolean
description

if true, the annotation is editable (can be dragged and manipulated by the user)

isHidden

isHidden: boolean
description

if true, the annotation is hidden

isHovered

isHovered: boolean

Defines if the entity is hovered

isSelected

isSelected: boolean
description

When true, the annotation is selected and resize adorners will be displayed

Readonly isSvgAnnotation

isSvgAnnotation: boolean
description

defines if the annotation is SVG annotation

isVerticalChart

isVerticalChart: boolean
description

if true, the chart is vertical

isVisible

isVisible: boolean

labelCornerRadius

labelCornerRadius: number

Gets or sets the corner/border radius for the line annotation labels, in pixels

labelPadding

labelPadding: Thickness

Extra padding (in pixels) applied to line annotation labels

default

new Thickness(0, 3, 0, 3) // 3px of x-padding and 0px of y-padding

labelPlacement

labelPlacement: ELabelPlacement

Gets the labelPlacement for the LineAnnotation

labelValue

labelValue: string

Gets the labelValue for the LineAnnotation

opacity

opacity: number

Sets an opacity override for the entire annotation, from 0..1

parentSurface

parentSurface: SciChartSurfaceBase
description

the parent SciChartSurfaceBase for this annotation

selectionBoxDelta

selectionBoxDelta: number

How much bigger the selection box is than the bounding box of the annotation, in pixels

selectionBoxStroke

selectionBoxStroke: string

The stroke color for the adorner selection box

selectionBoxThickness

selectionBoxThickness: number

The thickness of the selection box line

setRenderNextTo

setRenderNextTo: (renderable: IOrderedRenderable | string, offset: number) => void

Type declaration

setRenderOrder

setRenderOrder: (order: number) => void

Type declaration

    • (order: number): void
    • Parameters

      • order: number

      Returns void

showLabel

showLabel: boolean

Gets the showLabel for the LineAnnotation

stroke

stroke: string

Gets the stroke for the {@link RolloverLineAnnotation}

strokeDashArray

strokeDashArray: number[]

Gets the strokeDashArray for the LineAnnotation

strokeThickness

strokeThickness: number

Gets the strokeThickness for the LineAnnotation

Readonly surfaceTypes

surfaceTypes: ESurfaceType[]
description

compatible surface types. See EAnnotationType for a list of values

Readonly type

description

annotation type. See EAnnotationType for a list of values

x1

x1: number
description

the X1 coordinate of the annotation

remarks

The X1 coordinate obeys xCoordinateMode which defines whether the X1 coordinate is a pixel, data-value or relative coordinate

x2

x2: number
description

the X2 coordinate of the annotation

remarks

The X1 coordinate obeys xCoordinateMode which defines whether the X2 coordinate is a pixel, data-value or relative coordinate

Readonly xAxis

xAxis: AxisBase2D | undefined

Gets the bound XAxis for this IAnnotation.

xAxisId

xAxisId: string | undefined
summary

The current XAxis Id that this IAnnotation is bound to. If undefined it will use the first X axis attached to SciChartSurface

description

By default all Annotations will draw on the first X,Y axis pair in SciChart. If you want this to change, you must add a second axis to your SciChartSurface and link the IAnnotation by Axis Id.

For example:

const sciChartSurface: SciChartSurface;
const primaryXAxis = new NumericAxis(wasmContext);
const primaryYAxis = new NumericAxis(wasmContext);

const secondaryXAxis = new NumericAxis(wasmContext); // For subsequent X,Y axis set an Id
secondaryXAxis.id = "SecondaryXAxis";
const secondaryYAxis = new NumericAxis(wasmContext);
secondaryYAxis.id = "SecondaryYAxis";

// Add all Axis to the chart
sciChartSurface.xAxes.add(primaryXAxis);
sciChartSurface.yAxes.add(primaryYAxis);
sciChartSurface.xAxes.add(secondaryXAxis);
sciChartSurface.yAxes.add(secondaryYAxis);

// Add an Annotation on the default axis
const annotation = new LineAnnotation(wasmContext);
sciChartSurface.renderableSeries.add(annotation);

// Add an Annotation on the specific axis
const annotation2 = new LineAnnotation(wasmContext);
annotation2.xAxisId = "SecondaryXAxis";
annotation2.yAxisId = "SecondaryYAxis";
sciChartSurface.renderableSeries.add(annotation2);

xCoordinateMode

xCoordinateMode: ECoordinateMode

The X-Coordinate mode. See ECoordinateMode for a list of values

remarks

Want to display an annotation stretching across the entire width (or height) or the SciChartSurface? The ECoordinateMode enum has options which allow for relative, absolute or pixel coordinates which define annotation placement.

y1

y1: number
description

the Y1 coordinate of the annotation

remarks

The Y1 coordinate obeys xCoordinateMode which defines whether the Y1 coordinate is a pixel, data-value or relative coordinate

y2

y2: number
description

the Y2 coordinate of the annotation

remarks

The Y2 coordinate obeys xCoordinateMode which defines whether the Y2 coordinate is a pixel, data-value or relative coordinate

Readonly yAxis

yAxis: AxisBase2D | undefined

Gets the bound YAxis for this IAnnotation.

yAxisId

yAxisId: string | undefined
summary

The current YAxis Id that this IAnnotation is bound to. If undefined it will use the first X axis attached to SciChartSurface

description

By default all Annotations will draw on the first X,Y axis pair in SciChart. If you want this to change, you must add a second axis to your SciChartSurface and link the IAnnotation by Axis Id.

For example:

const sciChartSurface: SciChartSurface;
const primaryXAxis = new NumericAxis(wasmContext);
const primaryYAxis = new NumericAxis(wasmContext);

const secondaryXAxis = new NumericAxis(wasmContext); // For subsequent X,Y axis set an Id
secondaryXAxis.id = "SecondaryXAxis";
const secondaryYAxis = new NumericAxis(wasmContext);
secondaryYAxis.id = "SecondaryYAxis";

// Add all Axis to the chart
sciChartSurface.xAxes.add(primaryXAxis);
sciChartSurface.yAxes.add(primaryYAxis);
sciChartSurface.xAxes.add(secondaryXAxis);
sciChartSurface.yAxes.add(secondaryYAxis);

// Add an Annotation on the default axis
const annotation = new LineAnnotation(wasmContext);
sciChartSurface.renderableSeries.add(annotation);

// Add an Annotation on the specific axis
const annotation2 = new LineAnnotation(wasmContext);
annotation2.xAxisId = "SecondaryXAxis";
annotation2.yAxisId = "SecondaryYAxis";
sciChartSurface.renderableSeries.add(annotation2);

yCoordinateMode

yCoordinateMode: ECoordinateMode

The Y-Coordinate mode. See ECoordinateMode for a list of values

remarks

Want to display an annotation stretching across the entire width (or height) or the SciChartSurface? The ECoordinateMode enum has options which allow for relative, absolute or pixel coordinates which define annotation placement.

Methods

checkIsClickedOnAnnotation

  • checkIsClickedOnAnnotation(x: number, y: number): boolean
  • Checks if passed point on the canvas is inside annotation borders

    Parameters

    • x: number

      the X screen coordinate relative to canvas

    • y: number

      the Y screen coordinate relative to canvas

    Returns boolean

clickToSelect

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

linkAxes

  • linkAxes(): void

onAttach

  • description

    Called when the annotation is attached to a parent SciChartSurface.

    Parameters

    Returns void

onDetach

  • onDetach(): void
  • description

    Called when the annotation is detached from a parent SciChartSurface.

    Returns void

Protected onDpiChanged

  • Called when the Dpi changes in the browser. This could be due to user zooming the browser, or changing DPI settings in Windows, or moving the browser containing SciChart to another monitor

    Parameters

    Returns void

onDragAdorner

onDragEnded

  • onDragEnded(): void

onDragStarted

toJSON

  • toJSON(): any
  • Convert the object to a definition that can be serialized to JSON, or used directly with the builder api

    Returns any

Generated using TypeDoc