Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines the base class to an Annotation - a type of marker, text label, line or custom UI overlay on a 2D Cartesian SciChartSurface

Hierarchy

Implements

Index

Constructors

Protected constructor

Properties

adornerDraggingPoint

adornerDraggingPoint: EDraggingGripPoint

dragDelta

dragEnded

dragEnded: EventHandler<void>

dragStarted

dragStarted: EventHandler<void>

Readonly id

id: string

A unique Id for the IAnnotation

invalidateParentCallback

invalidateParentCallback: () => void
description

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

Type declaration

    • (): void
    • Returns void

Protected isHiddenProperty

isHiddenProperty: boolean = false

Readonly isSvgAnnotation

isSvgAnnotation: boolean
description

defines if the annotations is SVG annotation or RenderContext annotation

Protected prevIsSelected

prevIsSelected: boolean = true

Protected prevValue

prevValue: { x: number; y: number }

Type declaration

  • x: number
  • y: number

showWarning

showWarning: boolean = true

Protected svgAdorner

svgAdorner: SVGElement

Readonly Abstract type

description

annotation type. See EAnnotationType for a list of values

Protected typeMap

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

Accessors

annotationLayer

  • inheritdoc

    Returns EAnnotationLayer

  • inheritdoc

    Parameters

    Returns void

isDraggingStarted

  • get isDraggingStarted(): boolean
  • Returns boolean

isEditable

  • get isEditable(): boolean
  • set isEditable(isEditable: boolean): void
  • inheritdoc

    Returns boolean

  • inheritdoc

    Parameters

    • isEditable: boolean

    Returns void

isHidden

  • get isHidden(): boolean
  • set isHidden(isHidden: boolean): void
  • inheritdoc

    Returns boolean

  • inheritdoc

    Parameters

    • isHidden: boolean

    Returns void

isSelected

  • get isSelected(): boolean
  • set isSelected(value: boolean): void
  • inheritdoc

    Returns boolean

  • inheritdoc

    Parameters

    • value: boolean

    Returns void

isVerticalChart

  • get isVerticalChart(): boolean
  • inheritdoc

    Returns boolean

opacity

  • get opacity(): number
  • set opacity(opacity: number): void
  • Sets an opacity override for the entire annotation, from 0..1

    inheritdoc

    Returns number

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

    inheritdoc

    Parameters

    • opacity: number

    Returns void

parentSurface

  • inheritdoc

    Returns SciChartSurface

  • inheritdoc

    Parameters

    Returns void

resizeDirections

  • inheritdoc

    Returns EXyDirection

  • inheritdoc

    Parameters

    Returns void

Protected svgAdornerRoot

  • get svgAdornerRoot(): SVGSVGElement
  • Returns SVGSVGElement

x1

  • get x1(): number
  • set x1(x1: number): void
  • inheritdoc

    Returns number

  • inheritdoc

    Parameters

    • x1: number

    Returns void

x2

  • get x2(): number
  • set x2(x2: number): void
  • inheritdoc

    Returns number

  • inheritdoc

    Parameters

    • x2: number

    Returns void

xAxisId

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

    Returns string

  • inheritdoc

    Parameters

    • xAxisId: string

    Returns void

xCoordinateMode

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

    inheritdoc

    Returns ECoordinateMode

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

    inheritdoc

    Parameters

    Returns void

y1

  • get y1(): number
  • set y1(y1: number): void
  • inheritdoc

    Returns number

  • inheritdoc

    Parameters

    • y1: number

    Returns void

y2

  • get y2(): number
  • set y2(y2: number): void
  • inheritdoc

    Returns number

  • inheritdoc

    Parameters

    • y2: number

    Returns void

yAxisId

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

    Returns string

  • inheritdoc

    Parameters

    • yAxisId: string

    Returns void

yCoordinateMode

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

    inheritdoc

    Returns ECoordinateMode

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

    inheritdoc

    Parameters

    Returns void

Methods

calcDragDistance

  • calcDragDistance(xyPoint: Point): void
  • Parameters

    Returns void

checkIsClickedOnAnnotation

  • checkIsClickedOnAnnotation(x: number, y: number): boolean

Protected checkIsClickedOnAnnotationInternal

  • checkIsClickedOnAnnotationInternal(x: number, y: number): boolean
  • Parameters

    • x: number
    • y: number

    Returns boolean

clickToSelect

Protected convertFromCoordinate

  • Converts an absolute coordinate to a value which could be in form of DataValue, Pixel, or Relative coordinate

    Parameters

    Returns number

    the data-value, pixel, or relative value accordingly to the coordinateMode

Abstract 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 deleteAdorner

  • deleteAdorner(): void
  • Returns void

Protected getAbsoluteCoordinates

  • Calculates coordinates in pixels of the specified Point. Uses the xCoordinateMode (or yCoordinateMode for vertical chart)

    Parameters

    Returns Point

Protected getAbsoluteHorizontalCoordinate

  • getAbsoluteHorizontalCoordinate(value: number): number
  • Calculates coordinates in pixels of the specified Point. Uses the xCoordinateMode (or yCoordinateMode for vertical chart)

    Parameters

    • value: number

    Returns number

Protected getAbsoluteVerticalCoordinate

  • getAbsoluteVerticalCoordinate(value: number): number
  • Calculates coordinate in pixels of the specified value in the vertical dimension. Uses the yCoordinateMode (or xCoordinateMode for vertical chart)

    Parameters

    • value: number

    Returns number

getAdornerAnnotationBorders

  • getAdornerAnnotationBorders(ordered?: boolean): { x1: number; x2: number; y1: number; y2: number }
  • Returns annotation borders for the AdornerLayer which has the size of the whole canvas

    Parameters

    • Default value ordered: boolean = false

      flag to return x and y values in ascending order

    Returns { x1: number; x2: number; y1: number; y2: number }

    • x1: number
    • x2: number
    • y1: number
    • y2: number

getAnnotationBorders

  • getAnnotationBorders(ordered?: boolean): { x1: number; x2: number; y1: number; y2: number }
  • Returns annotationBorders

    Parameters

    • Default value ordered: boolean = false

      flag to return x and y values in ascending order, where x1 <= x2 and y1 <= y2

    Returns { x1: number; x2: number; y1: number; y2: number }

    • x1: number
    • x2: number
    • y1: number
    • y2: number

Protected getCoordinate

Protected getValue

Protected getValuesFromCoordinates

  • getValuesFromCoordinates(point: Point, translateToSeriesViewRect: boolean): Point
  • Transforms an absolute coordinates point to the corresponding value point. The value point has x and y converted accordingly to the the coordinate modes xCoordinateMode and yCoordinateMode

    Parameters

    • point: Point
    • translateToSeriesViewRect: boolean

      defines if the coordinates should be projected from the Canvas to SeriesViewRect

    Returns Point

    a point with coordinates ECoordinateMode

Protected getX1Coordinate

Protected getX2Coordinate

Protected getXYCoordinatesFromValues

  • getXYCoordinatesFromValues(xyDataPoint: Point): Point
  • Parameters

    Returns Point

Protected getY1Coordinate

Protected getY2Coordinate

Protected notifyPropertyChanged

  • notifyPropertyChanged(propertyName: string): void
  • summary

    Notifies subscribers of {@link AnnotationBase.propertyChanged} that a property has changed and the chart requires redrawing

    description

    SciChart provides fully reactive components, changing any property or changing data will cause the AnnotationBase to redraw where necessary. This method notifies subscribers of the {@link AnnotationBase.propertyChanged} EventHandler that a property has changed.

    Parameters

    • propertyName: string

      The name of the property which has changed

    Returns 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

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

resumeInvalidate

  • resumeInvalidate(): void
  • Internal use. If isHidden,x1,y1 have change since suspendInvalidate was called, call invalidateParent

    Returns void

Protected setAnnotationBorders

  • setAnnotationBorders(x1: number, x2: number, y1: number, y2: number): void
  • Sets annotationBorders For renderContext annotations it is scaled and for SVG annotations it is not For example if we have a macbook with retina display and canvas.width = 1600px, canvas.height = 1200px, canvas.style.width = 800px, canvas.style.height = 600px If we have BoxAnnotation (renderContext) which takes 50% width and height, located in the left-top corner it should have annotationBorders as follows x1 = 0, x2 = 800, y1 = 0, y2 = 600 But if we have CustomAnnotation (SVG) which takes 50% width and height, located in the left-top corner it should have annotationBorders as follows x1 = 0, x2 = 400, y1 = 0, y2 = 300

    Parameters

    • x1: number
    • x2: number
    • y1: number
    • y2: number

    Returns void

suspendInvalidate

  • suspendInvalidate(): void
  • Internal use. Captures the state of isHidden,x1,y1 and prevents invalidateParent being called on change to these properties

    Returns void

toJSON

Protected Abstract updateAdornerInner

  • updateAdornerInner(): void
  • Updates adorner layer for the annotation

    Returns void

Object literals

Protected annotationBorders

annotationBorders: object

the annotation absolute coordinates

x1

x1: number = 0

x2

x2: number = 0

y1

y1: number = 0

y2

y2: number = 0

Generated using TypeDoc