Options
All
  • Public
  • Public/Protected
  • All
Menu

A TextAnnotation presents text information over the chart at specific {@link X1}, Y1 coordinates

Hierarchy

Implements

Index

Constructors

constructor

Properties

adornerDraggingPoint

adornerDraggingPoint: EDraggingGripPoint

dragDelta

dragEnded

dragEnded: EventHandler<void>

dragStarted

dragStarted: EventHandler<void>

Protected Optional fontFamilyProperty

fontFamilyProperty: string = "Arial"

Protected Optional fontSizeProperty

fontSizeProperty: number = 14

Protected Optional fontWeightProperty

fontWeightProperty: string = "Normal"

Protected horizontalAnchorPointProperty

horizontalAnchorPointProperty: EHorizontalAnchorPoint = EHorizontalAnchorPoint.Left

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 isDirty

isDirty: boolean = true

Protected isHiddenProperty

isHiddenProperty: boolean = false

Readonly isSvgAnnotation

isSvgAnnotation: boolean = true
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

Protected prevX1Coordinate

prevX1Coordinate: number = 0

Protected prevY1Coordinate

prevY1Coordinate: number = 0

showWarning

showWarning: boolean = true

Protected svgAdorner

svgAdorner: SVGElement

Protected svgDOMRect

svgDOMRect: DOMRect

Protected textColorProperty

textColorProperty: string = "#ffffff"

Protected textProperty

textProperty: string = "DEFAULT TEXT"

Readonly type

type: SVGTextAnnotation = EAnnotationType.SVGTextAnnotation
description

annotation type. See EAnnotationType for a list of values

Protected typeMap

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

Protected verticalAnchorPointProperty

verticalAnchorPointProperty: EVerticalAnchorPoint = EVerticalAnchorPoint.Top

Protected xCoordShiftProperty

xCoordShiftProperty: number = 0

The {@link SVGElement} which will be added to the chart

Protected yCoordShiftProperty

yCoordShiftProperty: number = 0

Accessors

annotationLayer

fontFamily

  • get fontFamily(): string
  • set fontFamily(fontFamily: string): void
  • font family provided by the user

    Returns string

  • font family provided by the user

    Parameters

    • fontFamily: string

    Returns void

fontSize

  • get fontSize(): number
  • set fontSize(fontSize: number): void
  • font size provided by the user

    Returns number

  • font size provided by the user

    Parameters

    • fontSize: number

    Returns void

fontWeight

  • get fontWeight(): string
  • set fontWeight(fontWeight: string): void
  • font weight provided by the user

    Returns string

  • font weight provided by the user

    Parameters

    • fontWeight: string

    Returns void

horizontalAnchorPoint

isDraggingStarted

  • get isDraggingStarted(): boolean

isEditable

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

isHidden

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

isSelected

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

isVerticalChart

  • get isVerticalChart(): 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

resizeDirections

svg

  • get svg(): SVGElement
  • Returns SVGElement

Protected svgAdornerRoot

  • get svgAdornerRoot(): SVGSVGElement

Protected svgRoot

  • get svgRoot(): SVGSVGElement
  • Gets the {@link SVGSVGElement | SVG Element} at the root of this annotation

    Returns SVGSVGElement

text

  • get text(): string
  • set text(text: string): void
  • text provided by the user

    Returns string

  • text provided by the user

    Parameters

    • text: string

    Returns void

textColor

  • get textColor(): string
  • set textColor(textColor: string): void
  • text color provided by the user

    Returns string

  • text color provided by the user

    Parameters

    • textColor: string

    Returns void

verticalAnchorPoint

x1

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

x2

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

xAxisId

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

xCoordShift

  • get xCoordShift(): number
  • set xCoordShift(value: number): void
  • Gets or sets an offset to shift X-coordinates

    Returns number

  • Gets or sets an offset to shift X-coordinates

    Parameters

    • value: number

    Returns void

xCoordinateMode

y1

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

y2

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

yAxisId

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

yCoordShift

  • get yCoordShift(): number
  • set yCoordShift(value: number): void
  • Gets or sets an offset to shift Y-coordinates

    Returns number

  • Gets or sets an offset to shift Y-coordinates

    Parameters

    • value: number

    Returns void

yCoordinateMode

Methods

Protected calcAndSetAnnotationBorders

calcDragDistance

  • calcDragDistance(xyValues: Point): void

checkIsClickedOnAnnotation

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

Protected checkIsClickedOnAnnotationInternal

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

clickToSelect

Protected convertFromCoordinate

Protected create

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

Protected getAbsoluteCoordinates

Protected getAbsoluteHorizontalCoordinate

  • getAbsoluteHorizontalCoordinate(value: number): number

Protected getAbsoluteVerticalCoordinate

  • getAbsoluteVerticalCoordinate(value: number): 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

Protected getX1Coordinate

Protected getX2Coordinate

Protected getXYCoordinatesFromValues

  • getXYCoordinatesFromValues(xyDataPoint: Point): Point

Protected getY1Coordinate

Protected getY2Coordinate

Protected notifyPropertyChanged

  • notifyPropertyChanged(): void

onAttach

onDetach

  • onDetach(): void

onDpiChanged

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

Protected setSvg

  • setSvg(svg: SVGElement): void
  • Parameters

    • svg: SVGElement

    Returns void

Protected setSvgAttribute

  • setSvgAttribute(attributeName: string, value: number): void
  • Parameters

    • attributeName: string
    • value: 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

update

Protected updateAdornerInner

  • updateAdornerInner(): 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