Options
All
  • Public
  • Public/Protected
  • All
Menu

Shared engine for annotations that repeat items along the x-axis from two control points.

remarks

The base normalizes to two points, constrains point 2 to point 1's y-value, manages the repeated-interval drag handles, enforces the maximum repeat count, and resolves the visible repeat positions for subclasses to render.

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Object literals

Constructors

Protected constructor

Properties

Protected activeDragPoint

activeDragPoint: IDragPoint | undefined

Protected adornerClippingProperty

adornerClippingProperty: EAnnotationClippingMode | string = EAnnotationClippingMode.Chart

Protected adornerDraggingPointProperty

adornerDraggingPointProperty: EDraggingGripPoint

Protected adornerStrokeLineCapProperty

adornerStrokeLineCapProperty: TSvgStrokeLineCap = "round"

Protected adornerStrokeLineJoinProperty

adornerStrokeLineJoinProperty: TSvgStrokeLineJoin = "round"

Protected adornerVisibilityProperty

adornerVisibilityProperty: EAnnotationVisibilityMode = EAnnotationVisibilityMode.OnInteraction

Protected annotationsGripsFillProperty

annotationsGripsFillProperty: string = SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBackgroundBrush

Protected annotationsGripsRadiusProperty

annotationsGripsRadiusProperty: number = ADORNER_GRIP_RADIUS

Protected annotationsGripsStrokeProperty

annotationsGripsStrokeProperty: string = SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBorderBrush

Protected axisLabelCornerRadiusProperty

axisLabelCornerRadiusProperty: number = 2

Protected axisLabelFillProperty

axisLabelFillProperty: string | undefined

Protected axisLabelPaddingProperty

axisLabelPaddingProperty: Thickness = new Thickness(2, 4, 2, 4)

Protected axisLabelStrokeProperty

axisLabelStrokeProperty: string | undefined

Protected axisLabelVisibilityProperty

axisLabelVisibilityProperty: EAnnotationVisibilityMode = EAnnotationVisibilityMode.OnInteraction

Protected axisSpanFillOpacityProperty

axisSpanFillOpacityProperty: number = 0.2

clicked

clicked: EventHandler<AnnotationClickEventArgs>

Protected clippingProperty

clippingProperty: EAnnotationClippingMode | string = EAnnotationClippingMode.SeriesViewRect

Protected connectorLinePenCache

connectorLinePenCache: Pen2DCache | undefined

Protected connectorLineStrokeDashArrayProperty

connectorLineStrokeDashArrayProperty: number[] = [6, 4]

Protected connectorLineStrokeProperty

connectorLineStrokeProperty: string = ""

dragDelta

dragDelta: EventHandler<AnnotationDragDeltaEventArgs>

dragEnded

dragEnded: EventHandler<void>

Protected dragPointDefinitions

dragPointDefinitions: IDragPoint[] = []

Protected dragPointsProperty

dragPointsProperty: keyof EDraggingGripPoint[] = [EDraggingGripPoint.Body,EDraggingGripPoint.x1y1,EDraggingGripPoint.x2y2,EDraggingGripPoint.x2y1,EDraggingGripPoint.x1y2]

dragStarted

dragStarted: EventHandler<void>

Protected draggingCursorProperty

draggingCursorProperty: ECursorStyle = ECursorStyle.Grabbing

Protected extendEndProperty

extendEndProperty: boolean = true

Protected extendStartProperty

extendStartProperty: boolean = true

Protected gripSvgTemplateProperty

gripSvgTemplateProperty: TAnnotationGripSvgTemplate | undefined

Protected gripVisibilityProperty

gripVisibilityProperty: EAnnotationVisibilityMode = EAnnotationVisibilityMode.OnInteraction

Protected hasAppliedSnapToDataPointOnInit

hasAppliedSnapToDataPointOnInit: boolean = false

Protected hoverCursorProperty

hoverCursorProperty: ECursorStyle = ECursorStyle.Pointer

hovered

hovered: EventHandler<AnnotationHoverEventArgs>

Protected hoveredDragPointId

hoveredDragPointId: string | undefined

Readonly id

id: string
inheritdoc

Protected idleCursorProperty

idleCursorProperty: ECursorStyle = ECursorStyle.Crosshair

invalidateParentCallback

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

Type declaration

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

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

      Returns void

Protected invalidateState

invalidateState: { isHidden: boolean; x1: number; y1: number }

Type declaration

  • isHidden: boolean
  • x1: number
  • y1: number

Readonly isDomAnnotation

isDomAnnotation: boolean = false

Protected isHiddenProperty

isHiddenProperty: boolean = false

Readonly isSvgAnnotation

isSvgAnnotation: boolean = false
inheritdoc

Protected labelsProperty

labelsProperty: IMultiPointLabelDefinition[] = []

Protected lastDragMousePoint

lastDragMousePoint: Point | undefined

Protected maxRepeatCountProperty

maxRepeatCountProperty: number = MAX_REPEAT_COUNT_HARD_LIMIT

Protected multiPointLabelFormatterProperty

multiPointLabelFormatterProperty: TMultiPointLabelFormatter | undefined

Protected multiPointLabelStyleFormatterProperty

multiPointLabelStyleFormatterProperty: TMultiPointLabelStyleFormatter | undefined

Protected parentAnnotationIdProperty

parentAnnotationIdProperty: string | null = null

Protected parentSurfaceProperty

parentSurfaceProperty: SciChartSurfaceBase

Protected pointLabelVisibilityProperty

pointLabelVisibilityProperty: EAnnotationVisibilityMode = EAnnotationVisibilityMode.Always

Protected pointsProperty

pointsProperty: Point[] = []

Protected prevIsSelected

prevIsSelected: boolean = true

Protected prevValue

prevValue: { x: number; y: number }

Type declaration

  • x: number
  • y: number

Protected renderLayerProperty

renderLayerProperty: EDefaultRenderLayer | number

Protected renderNextToProperty

renderNextToProperty: { offset: number; renderable: IOrderedRenderable | string }

Type declaration

  • offset: number
  • renderable: IOrderedRenderable | string

Protected renderOrderProperty

renderOrderProperty: number = undefined

Protected segmentLabelVisibilityProperty

segmentLabelVisibilityProperty: EAnnotationVisibilityMode = EAnnotationVisibilityMode.Always

selectedChanged

selectedChanged: EventHandler<boolean>

Protected selectionBoxDeltaProperty

selectionBoxDeltaProperty: number = 1.5

Protected selectionBoxStrokeProperty

selectionBoxStrokeProperty: string = SciChartSurfaceBase.DEFAULT_THEME.annotationSelectionStroke

Protected selectionBoxThicknessProperty

selectionBoxThicknessProperty: number = 6

Protected showConnectorLineProperty

showConnectorLineProperty: boolean = true

Protected snapModeProperty

snapModeProperty: ESnapMode = ESnapMode.None

Protected snapToDataPointOnInitProperty

snapToDataPointOnInitProperty: boolean = false

Protected snapToDataPointRadiusProperty

snapToDataPointRadiusProperty: number = 10

Protected snapToSeriesIdProperty

snapToSeriesIdProperty: string | undefined

Protected strokeDashArrayProperty

strokeDashArrayProperty: number[] = []

Protected strokePenCache

strokePenCache: Pen2DCache | undefined

Protected strokeProperty

strokeProperty: string = "#199d17"

Protected strokeThicknessProperty

strokeThicknessProperty: number = 2

Protected surfaceRenderOrderProperty

surfaceRenderOrderProperty: number = undefined

Readonly surfaceTypes

surfaceTypes: ESurfaceType[] = [ESurfaceType.SciChartSurfaceType]
inheritdoc

Protected svgAdorner

svgAdorner: SVGElement

Readonly Abstract type

type: EAnnotationType
inheritdoc

Protected typeMap

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

Protected x1Property

x1Property: number

Protected xCoordinateModeProperty

xCoordinateModeProperty: ECoordinateMode = ECoordinateMode.DataValue

Protected y1Property

y1Property: number

Protected yCoordinateModeProperty

yCoordinateModeProperty: ECoordinateMode = ECoordinateMode.DataValue

Accessors

adornerClipping

  • get adornerClipping(): string
  • set adornerClipping(value: EAnnotationClippingMode | string): void
  • Gets or sets mode or custom rule for adorners clipping

    Returns string

  • Gets or sets mode or custom rule for adorners clipping

    Parameters

    • value: EAnnotationClippingMode | string

    Returns void

adornerDraggingPoint

  • get adornerDraggingPoint(): EDraggingGripPoint
  • set adornerDraggingPoint(value: EDraggingGripPoint): void

adornerStrokeLineCap

adornerStrokeLineJoin

adornerVisibility

annotationLayer

  • get annotationLayer(): EAnnotationLayer
  • set annotationLayer(annotationCanvas: EAnnotationLayer): void

annotationsGripsFill

  • get annotationsGripsFill(): string
  • set annotationsGripsFill(color: string): void
  • Multi-point grips default to the current theme background unless explicitly overridden.

    Returns string

  • Multi-point grips default to the current theme background unless explicitly overridden.

    Parameters

    • color: string

    Returns void

annotationsGripsRadius

  • get annotationsGripsRadius(): number
  • set annotationsGripsRadius(radius: number): void

annotationsGripsStroke

  • get annotationsGripsStroke(): string
  • set annotationsGripsStroke(color: string): void
  • Gets or sets the grip stroke color.

    Returns string

  • Gets or sets the grip stroke color.

    Parameters

    • color: string

    Returns void

axisLabelCornerRadius

  • get axisLabelCornerRadius(): number
  • set axisLabelCornerRadius(value: number): void
  • Gets or sets axis-label corner radius for labels with anchorMode: Axis.

    Returns number

  • Gets or sets axis-label corner radius for labels with anchorMode: Axis.

    Parameters

    • value: number

    Returns void

axisLabelFill

  • get axisLabelFill(): string | undefined
  • set axisLabelFill(value: string | undefined): void
  • Gets or sets axis-label fill for labels with anchorMode: Axis.

    Returns string | undefined

  • Gets or sets axis-label fill for labels with anchorMode: Axis.

    Parameters

    • value: string | undefined

    Returns void

axisLabelPadding

  • get axisLabelPadding(): Thickness
  • set axisLabelPadding(value: Thickness): void
  • Gets or sets axis-label padding for labels with anchorMode: Axis.

    Returns Thickness

  • Gets or sets axis-label padding for labels with anchorMode: Axis.

    Parameters

    • value: Thickness

    Returns void

axisLabelStroke

  • get axisLabelStroke(): string
  • set axisLabelStroke(value: string): void
  • Gets or sets axis-label text color for labels with anchorMode: Axis.

    Returns string

  • Gets or sets axis-label text color for labels with anchorMode: Axis.

    Parameters

    • value: string

    Returns void

axisLabelVisibility

axisSpanFillOpacity

  • get axisSpanFillOpacity(): number
  • set axisSpanFillOpacity(value: number): void
  • Gets or sets span opacity between adjacent axis labels for labels with anchorMode: Axis.

    Returns number

  • Gets or sets span opacity between adjacent axis labels for labels with anchorMode: Axis.

    Parameters

    • value: number

    Returns void

clipping

  • get clipping(): string
  • set clipping(value: EAnnotationClippingMode | string): void
  • Gets or sets mode or custom rule for clipping

    Returns string

  • Gets or sets mode or custom rule for clipping

    Parameters

    • value: EAnnotationClippingMode | string

    Returns void

connectorLineStroke

  • get connectorLineStroke(): string
  • set connectorLineStroke(value: string): void
  • Gets or sets the connector line stroke. Defaults to the main stroke.

    Returns string

  • Gets or sets the connector line stroke. Defaults to the main stroke.

    Parameters

    • value: string

    Returns void

connectorLineStrokeDashArray

  • get connectorLineStrokeDashArray(): number[]
  • set connectorLineStrokeDashArray(value: number[] | undefined): void
  • Gets or sets the connector line dash pattern.

    Returns number[]

  • Gets or sets the connector line dash pattern.

    Parameters

    • value: number[] | undefined

    Returns void

defaultBackgroundColor

  • get defaultBackgroundColor(): string

defaultForegroundColor

  • get defaultForegroundColor(): string

dragPoints

  • get dragPoints(): keyof EDraggingGripPoint[]
  • set dragPoints(dragPoints: keyof EDraggingGripPoint[]): void
  • Get the dragging points that should be enabled for this annotation

    Returns keyof EDraggingGripPoint[]

  • Set the dragging points that should be enabled for this annotation

    Parameters

    • dragPoints: keyof EDraggingGripPoint[]

    Returns void

draggingCursor

  • get draggingCursor(): ECursorStyle
  • set draggingCursor(value: ECursorStyle): void
  • Gets or sets dragging cursor.

    Returns ECursorStyle

  • Gets or sets dragging cursor.

    Parameters

    • value: ECursorStyle

    Returns void

extendEnd

  • get extendEnd(): boolean
  • set extendEnd(value: boolean): void
  • Gets or sets whether the repeated geometry extends after point 2.

    Returns boolean

  • Gets or sets whether the repeated geometry extends after point 2.

    Parameters

    • value: boolean

    Returns void

extendStart

  • get extendStart(): boolean
  • set extendStart(value: boolean): void
  • Gets or sets whether the repeated geometry extends before point 1.

    Returns boolean

  • Gets or sets whether the repeated geometry extends before point 1.

    Parameters

    • value: boolean

    Returns void

formatLabel

formatLabelStyle

gripSvgTemplate

  • get gripSvgTemplate(): TAnnotationGripSvgTemplate | undefined
  • set gripSvgTemplate(value: TAnnotationGripSvgTemplate | undefined): void

gripVisibility

hoverCursor

  • get hoverCursor(): ECursorStyle
  • set hoverCursor(value: ECursorStyle): void
  • Gets or sets hover cursor.

    Returns ECursorStyle

  • Gets or sets hover cursor.

    Parameters

    • value: ECursorStyle

    Returns void

idleCursor

  • get idleCursor(): ECursorStyle
  • set idleCursor(value: ECursorStyle): void
  • Gets or sets idle cursor.

    Returns ECursorStyle

  • Gets or sets idle cursor.

    Parameters

    • value: ECursorStyle

    Returns void

isDraggingStarted

  • get isDraggingStarted(): boolean

isEditable

  • get isEditable(): boolean
  • set isEditable(isEditable: boolean): void
  • Editing flag toggled during placement workflow.

    inheritdoc

    Returns boolean

  • Editing flag toggled during placement workflow.

    inheritdoc

    Parameters

    • isEditable: boolean

    Returns void

isHidden

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

isHovered

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

isSelected

  • get isSelected(): boolean
  • set isSelected(value: boolean): void
  • Selection state used to keep adorner visible while placing.

    inheritdoc

    Returns boolean

  • Selection state used to keep adorner visible while placing.

    inheritdoc

    Parameters

    • value: boolean

    Returns void

isVerticalChart

  • get isVerticalChart(): boolean

isVisible

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

labels

maxRepeatCount

  • get maxRepeatCount(): number
  • set maxRepeatCount(value: number): void
  • Gets or sets the maximum repeat count, clamped to the hard limit.

    Returns number

  • Gets or sets the maximum repeat count, clamped to the hard limit.

    Parameters

    • value: number

    Returns void

opacity

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

parentAnnotationId

  • get parentAnnotationId(): string | null
  • set parentAnnotationId(value: string | null): void

parentSurface

  • get parentSurface(): SciChartSurface
  • set parentSurface(parentSurface: SciChartSurface): void
  • inheritdoc

    Returns SciChartSurface

  • inheritdoc

    Parameters

    • parentSurface: SciChartSurface

    Returns void

pointLabelVisibility

points

  • get points(): Point[]
  • set points(value: Point[]): void
  • Gets or sets points.

    Returns Point[]

  • Gets or sets points.

    Parameters

    • value: Point[]

    Returns void

resizeDirections

  • get resizeDirections(): EXyDirection
  • set resizeDirections(value: EXyDirection): void

segmentLabelVisibility

selectionBoxDelta

  • get selectionBoxDelta(): number
  • set selectionBoxDelta(delta: number): void

selectionBoxStroke

  • get selectionBoxStroke(): string
  • set selectionBoxStroke(color: string): void

selectionBoxThickness

  • get selectionBoxThickness(): number
  • set selectionBoxThickness(delta: number): void

showConnectorLine

  • get showConnectorLine(): boolean
  • set showConnectorLine(value: boolean): void
  • Gets or sets whether the connector line between point 1 and point 2 is visible.

    Returns boolean

  • Gets or sets whether the connector line between point 1 and point 2 is visible.

    Parameters

    • value: boolean

    Returns void

snapMode

snapToDataPointOnInit

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

snapToDataPointRadius

  • get snapToDataPointRadius(): number
  • set snapToDataPointRadius(value: number): void

snapToSeriesId

  • get snapToSeriesId(): string | undefined
  • set snapToSeriesId(value: string | undefined): void
  • Gets or sets target snap series id.

    Returns string | undefined

  • Gets or sets target snap series id.

    Parameters

    • value: string | undefined

    Returns void

stroke

  • get stroke(): string
  • set stroke(value: string): void
  • Gets or sets the stroke color used by repeated geometry.

    Returns string

  • Gets or sets the stroke color used by repeated geometry.

    Parameters

    • value: string

    Returns void

strokeDashArray

  • get strokeDashArray(): number[]
  • set strokeDashArray(value: number[]): void
  • Gets or sets the dash pattern used by repeated geometry.

    Returns number[]

  • Gets or sets the dash pattern used by repeated geometry.

    Parameters

    • value: number[]

    Returns void

strokeThickness

  • get strokeThickness(): number
  • set strokeThickness(value: number): void
  • Gets or sets the stroke thickness used by repeated geometry.

    Returns number

  • Gets or sets the stroke thickness used by repeated geometry.

    Parameters

    • value: number

    Returns void

Protected svgAdornerRoot

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

xAxis

  • get xAxis(): AxisBase2D | undefined
  • inheritdoc

    Returns AxisBase2D | undefined

xAxisId

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

    Returns string | undefined

  • inheritdoc

    Parameters

    • xAxisId: string

    Returns void

xCoordinateMode

  • get xCoordinateMode(): ECoordinateMode
  • set xCoordinateMode(xCoordinateMode: ECoordinateMode): 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

yAxis

  • get yAxis(): AxisBase2D | undefined
  • inheritdoc

    Returns AxisBase2D | undefined

yAxisId

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

    Returns string | undefined

  • inheritdoc

    Parameters

    • yAxisId: string

    Returns void

yCoordinateMode

  • get yCoordinateMode(): ECoordinateMode
  • set yCoordinateMode(yCoordinateMode: ECoordinateMode): void

Methods

Protected applyPixelRatioToDragDist

  • applyPixelRatioToDragDist(dist: number): number

Protected applySvgClipping

  • applySvgClipping(svgString: string, clipping: EAnnotationClippingMode | string): string
  • inheritdoc

    Parameters

    • svgString: string
    • clipping: EAnnotationClippingMode | string

    Returns string

Protected buildSvgPathFromCanvasPoints

  • buildSvgPathFromCanvasPoints(points: Point[]): string
  • Builds a path from CSS-pixel points, breaking the path whenever points are invalid.

    Parameters

    • points: Point[]

    Returns string

Protected buildSvgPathFromConnectedSegments

  • buildSvgPathFromConnectedSegments(segments: TLineSegment[], transform?: (point: Point) => Point | undefined): string | undefined
  • Builds a continuous path from connected line segments. Returns undefined when the segments are disconnected or branch in a way that cannot be represented as a single continuous stroke path.

    Parameters

    • segments: TLineSegment[]
    • Default value transform: (point: Point) => Point | undefined = point => point
        • (point: Point): Point | undefined
        • Parameters

          • point: Point

          Returns Point | undefined

    Returns string | undefined

calcDragDistance

  • calcDragDistance(xyValues: Point): void
  • inheritdoc

    Parameters

    • xyValues: Point

    Returns void

canDragPoint

  • canDragPoint(dragPoint: EDraggingGripPoint): boolean
  • Uses live drag definitions rather than the legacy enum list.

    Parameters

    • dragPoint: EDraggingGripPoint

    Returns boolean

checkIsClickedOnAnnotation

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

Protected checkIsClickedOnAnnotationInternal

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

checkIsPointWithinClipArea

  • checkIsPointWithinClipArea(mousePoint: Point): boolean

checkIsWithinBounds

  • checkIsWithinBounds(args: ModifierMouseArgs): boolean
  • Calculates if the annotation is hovered with the specified args

    Parameters

    • args: ModifierMouseArgs

    Returns boolean

Protected clamp01

  • clamp01(value: number): number
  • Clamps a number into [0..1].

    Parameters

    • value: number

    Returns number

Protected clampRepeatCount

  • clampRepeatCount(value: number): number
  • Parameters

    • value: number

    Returns number

click

  • click(args: ModifierMouseArgs, selectOnClick: boolean): boolean
  • Called internally. Send a click to the annotation if the point is in bounds, raising the clicked event and optionally selecting the annotation.

    Parameters

    • args: ModifierMouseArgs
    • selectOnClick: boolean

    Returns boolean

clickToSelect

  • clickToSelect(args: ModifierMouseArgs): boolean
  • Called internally. Select the annotation if the point is in bounds. Does not raise the clicked event

    Parameters

    • args: ModifierMouseArgs

    Returns boolean

Protected clonePoints

  • clonePoints(points: Point[] | undefined): Point[]
  • Returns a cloned point array.

    Parameters

    • points: Point[] | undefined

    Returns Point[]

Protected convertCartesianToPolar

  • convertCartesianToPolar(x: number, y: number): { x: number; y: number }
  • For Polar surface converts Cartesian Coordinates to Polar, otherwise returns the original values

    Parameters

    • x: number
    • y: number

    Returns { x: number; y: number }

    • x: number
    • y: number

Protected convertFromCoordinate

  • convertFromCoordinate(value: number, calculator: CoordinateCalculatorBase, coordinateMode: ECoordinateMode): number
  • Converts an absolute coordinate to a value which could be in form of DataValue, Pixel, or Relative coordinate

    Parameters

    • value: number

      an absolute coordinate to convert

    • calculator: CoordinateCalculatorBase

      the {@link CoordinateCalculatorBase} which will do the transformation

    • coordinateMode: ECoordinateMode

      the expected {@link ECoordinateMode} of the converted point

    Returns number

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

Protected convertPolarToCartesian

  • convertPolarToCartesian(x: number, y: number, isDomAnnotation?: boolean): { x: number; y: number }
  • For Polar surface converts Polar Coordinates to Cartesian, otherwise returns the original values

    Parameters

    • x: number

      is always angle for Polar

    • y: number

      is always radius for Polar

    • Default value isDomAnnotation: boolean = false

    Returns { x: number; y: number }

    • x: number
    • y: number

Protected copyThickness

  • copyThickness(value: Thickness): Thickness
  • Clones a thickness value.

    Parameters

    • value: Thickness

    Returns Thickness

Protected createGripSvgTemplateContext

delete

  • delete(): void
  • inheritdoc

    Returns void

Protected deleteAdorner

  • deleteAdorner(): void

Protected drawAxisAnchoredLabels

  • drawAxisAnchoredLabels(renderContext: IRenderContext2D, labelCoords: number[], defaultFill?: string, axes?: AxisBase2D[]): void
  • Draws axis labels + spans for explicit axis coordinates in series-view-rect pixels.

    Parameters

    • renderContext: IRenderContext2D
    • labelCoords: number[]
    • Optional defaultFill: string
    • Default value axes: AxisBase2D[] = this.getVirtualYAxes()

    Returns void

Protected drawAxisAnchoredLabelsFromDefinitions

  • drawAxisAnchoredLabelsFromDefinitions(renderContext: IRenderContext2D, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, defaultFill?: string): void
  • Draws axis labels + spans for labels with anchorMode: Axis.

    Parameters

    • renderContext: IRenderContext2D
    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase
    • Optional defaultFill: string

    Returns void

Protected drawConnectorLine

  • drawConnectorLine(renderContext: IRenderContext2D, connectorLine: TLineSegment | undefined, seriesViewRect: Rect, clipRect: Rect): void
  • Draws the connector line between the two control points.

    Parameters

    • renderContext: IRenderContext2D
    • connectorLine: TLineSegment | undefined
    • seriesViewRect: Rect
    • clipRect: Rect

    Returns void

Protected drawPointAndSegmentLabels

  • drawPointAndSegmentLabels(renderContext: IRenderContext2D, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void
  • Draws point/segment labels via the texture text rendering path.

    Parameters

    • renderContext: IRenderContext2D
    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase

    Returns void

Abstract drawWithContext

  • drawWithContext(renderContext: IRenderContext2D, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, seriesViewRect: Rect, surfaceViewRect: Rect, chartViewRect: Rect): void
  • description

    draws the annotation with RenderContext. May be overriden in derived classes for fast drawing direct on render surface

    Parameters

    • renderContext: IRenderContext2D
    • xCalc: CoordinateCalculatorBase

      the X Axis Coordinate Calculator for the current draw operation

    • yCalc: CoordinateCalculatorBase

      the Y Axis Coordinate Calculator for the current draw operation

    • seriesViewRect: Rect
    • surfaceViewRect: Rect
    • chartViewRect: Rect

    Returns void

Protected ensureBrushCache

  • ensureBrushCache(cache: BrushCache | undefined): BrushCache | undefined
  • Ensures a brush cache exists for the current surface.

    Parameters

    • cache: BrushCache | undefined

    Returns BrushCache | undefined

Protected ensurePenCache

  • ensurePenCache(cache: Pen2DCache | undefined): Pen2DCache | undefined
  • Ensures a pen cache exists for the current surface.

    Parameters

    • cache: Pen2DCache | undefined

    Returns Pen2DCache | undefined

Protected getAbsoluteCoordinates

  • getAbsoluteCoordinates(point: Point): Point

Protected getAbsoluteHorizontalCoordinate

  • getAbsoluteHorizontalCoordinate(value: number): number

Protected getAbsoluteVerticalCoordinate

  • getAbsoluteVerticalCoordinate(value: number): number

getAdornerAnnotationBorders

  • getAdornerAnnotationBorders(ordered?: boolean, applyDelta?: boolean): { x1: number; x2: number; y1: number; y2: number }
  • Returns annotation borders for the {@link 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

    • Default value applyDelta: boolean = false

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

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

getAnnotationBorders

  • getAnnotationBorders(ordered?: boolean, applyDelta?: 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

    • Default value applyDelta: boolean = false

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

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

getAnnotationGripSvg

  • Trading annotations have a more modern default grip SVG

    Parameters

    Returns string

Protected getClipOverscan

  • getClipOverscan(strokeThickness: number): number
  • Returns a DPI-adjusted overscan amount for geometry that will still be rendered with the real clip rect.

    Parameters

    • strokeThickness: number

    Returns number

Protected getClipPath

  • getClipPath(clipping: EAnnotationClippingMode | string): string
  • Parameters

    • clipping: EAnnotationClippingMode | string

    Returns string

getClippingRect

  • getClippingRect(clipping: string | EAnnotationClippingMode, seriesViewRect: Rect, surfaceViewRect: Rect, chartViewRect: Rect): Rect
  • Parameters

    • clipping: string | EAnnotationClippingMode
    • seriesViewRect: Rect
    • surfaceViewRect: Rect
    • chartViewRect: Rect

    Returns Rect

Protected getCoordinate

  • getCoordinate(value: number, calculator: CoordinateCalculatorBase, coordinateMode: ECoordinateMode): number
  • Converts a value (e.g. from x1, x2, y1 or y2) into a pixel coordinate

    Parameters

    • value: number

      the value to convert

    • calculator: CoordinateCalculatorBase

      the {@link CoordinateCalculatorBase} which will do the transformation

    • coordinateMode: ECoordinateMode

      the {@link ECoordinateMode} to apply

    Returns number

    the pixel coordinate

Protected getDragPointIdForPointIndex

  • getDragPointIdForPointIndex(index: number): string | undefined

getGripSvg

  • getGripSvg(index: number): string

getInteractionHandles

Protected getPixelPointFromValue

  • getPixelPointFromValue(valuePoint: Point | undefined, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): Point | undefined
  • Converts one value-space point to series-view-rect pixel coordinates.

    Parameters

    • valuePoint: Point | undefined
    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase

    Returns Point | undefined

Protected getPixelPoints

  • getPixelPoints(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): Point[]
  • Returns points converted to series-view-rect pixel coordinates.

    Parameters

    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase

    Returns Point[]

getPlacementPointCount

  • getPlacementPointCount(): number

Protected getPlacementPointCountInternal

  • getPlacementPointCountInternal(): number

getPointScreenPosition

  • getPointScreenPosition(index: number): Point | undefined

getPointValue

  • getPointValue(index: number): Point | undefined

getRenderLayer

  • getRenderLayer(): number
  • The render layer grouping within which the annotation will be draw. Defaults to EDefaultRenderLayer.AnnotationsAboveSeriesLayer

    Returns number

getRenderNextTo

  • getRenderNextTo(): { offset: number; renderable: IOrderedRenderable | string }
  • Returns { offset: number; renderable: IOrderedRenderable | string }

    • offset: number
    • renderable: IOrderedRenderable | string

getRenderOrder

  • getRenderOrder(): number

Protected getResolvedCoordinate

  • getResolvedCoordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, x: number, y: number, getX: boolean): number
  • Returns the pixel coordinate depending whether the chart is vertical

    Parameters

    • xCalc: CoordinateCalculatorBase

      the X {@link CoordinateCalculatorBase} which will do the transformation

    • yCalc: CoordinateCalculatorBase

      the Y {@link CoordinateCalculatorBase} which will do the transformation

    • x: number

      the x value

    • y: number

      the y value

    • getX: boolean

      true to return the x coordinate. false for y.

    Returns number

    the pixel coordinate

Protected getSnapSeries

  • getSnapSeries(): IRenderableSeries | undefined
  • Returns the target renderable series for snapping.

    Returns IRenderableSeries | undefined

getSquareGripSvg

  • getSquareGripSvg(x: number, y: number, isSelected?: boolean): string
  • Trading annotations can override this to customize square grip rendering.

    Parameters

    • x: number
    • y: number
    • Default value isSelected: boolean = this.isSelected

    Returns string

getSurfaceRenderOrder

  • getSurfaceRenderOrder(): number
  • Allows an annotation to be treated as if it was drawn on a surface with a different draw order than its actual parent surface

    Returns number

Protected getSvgAdornerStrokeAttributes

  • getSvgAdornerStrokeAttributes(): string

Protected getValue

  • getValue(value: number, calculator: CoordinateCalculatorBase, coordinateMode: ECoordinateMode): number
  • Converts a pixel coordinate back to a value

    Parameters

    • value: number

      coordinate or dataValue to convert

    • calculator: CoordinateCalculatorBase

      the {@link CoordinateCalculatorBase} which will do the transformation

    • coordinateMode: ECoordinateMode

      the {@link ECoordinateMode} to apply

    Returns number

    the data-value or value

getValueFromMousePoint

  • getValueFromMousePoint(mousePoint: Point): Point | undefined

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 {@link ECoordinateMode}

Protected getVirtualXAxes

  • getVirtualXAxes(): AxisBase2D[]

Protected getVirtualYAxes

  • getVirtualYAxes(): AxisBase2D[]

Protected getX1Coordinate

  • getX1Coordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number
  • Returns the pixel X1 coordinate

    Parameters

    • xCalc: CoordinateCalculatorBase

      the X {@link CoordinateCalculatorBase} which will do the transformation

    • yCalc: CoordinateCalculatorBase

      the Y {@link CoordinateCalculatorBase} which will do the transformation

    Returns number

    the pixel X1 coordinate

Protected getX2Coordinate

  • getX2Coordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number
  • Returns the pixel X2 coordinate

    Parameters

    • xCalc: CoordinateCalculatorBase

      the X {@link CoordinateCalculatorBase} which will do the transformation

    • yCalc: CoordinateCalculatorBase

      the Y {@link CoordinateCalculatorBase} which will do the transformation

    Returns number

    the pixel X2 coordinate

Protected getXYCoordinatesFromValues

  • getXYCoordinatesFromValues(xyDataPoint: Point): Point

Protected getY1Coordinate

  • getY1Coordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number
  • Returns the pixel Y1 coordinate

    Parameters

    • xCalc: CoordinateCalculatorBase

      the X {@link CoordinateCalculatorBase} which will do the transformation

    • yCalc: CoordinateCalculatorBase

      the Y {@link CoordinateCalculatorBase} which will do the transformation

    Returns number

    the pixel Y1 coordinate

Protected getY2Coordinate

  • getY2Coordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number
  • Returns the pixel Y2 coordinate

    Parameters

    • xCalc: CoordinateCalculatorBase

      the X {@link CoordinateCalculatorBase} which will do the transformation

    • yCalc: CoordinateCalculatorBase

      the Y {@link CoordinateCalculatorBase} which will do the transformation

    Returns number

    the pixel Y2 coordinate

hitTestBody

  • hitTestBody(mousePoint: Point): boolean

Protected hitTestRenderableSeries

  • hitTestRenderableSeries(rs: IRenderableSeries, mousePoint: Point): HitTestInfo
  • Hit-tests renderable series for snapping.

    Parameters

    • rs: IRenderableSeries
    • mousePoint: Point

    Returns HitTestInfo

hover

  • hover(options: IHoverOptions): void
  • Sends hover/leave action to the annotation

    Parameters

    • options: IHoverOptions

    Returns void

Protected inflateClipRect

  • inflateClipRect(rect: Rect, padding: number): Rect
  • Inflates a local clip rect so pre-clipped geometry can extend just beyond the rendered clip.

    Parameters

    • rect: Rect
    • padding: number

    Returns Rect

Protected isDragPointActive

  • isDragPointActive(dragPointId: string | undefined): boolean
  • Parameters

    • dragPointId: string | undefined

    Returns boolean

linkAxes

  • linkAxes(): void

Protected normalizePoints

  • normalizePoints(points: Point[] | undefined, maxCount?: number): Point[]
  • Sanitizes and clones points, optionally capping count.

    Parameters

    • points: Point[] | undefined
    • Optional maxCount: number

    Returns Point[]

Protected notifyPropertyChanged

  • notifyPropertyChanged(propertyName: string): void

onAttach

  • onAttach(scs: SciChartSurface): void
  • inheritdoc

    Parameters

    • scs: SciChartSurface

    Returns void

onDetach

  • onDetach(): void
  • inheritdoc

    Returns void

onDpiChanged

  • onDpiChanged(args: TDpiChangedEventArgs): void

onDragAdorner

  • onDragAdorner(args: ModifierMouseArgs): void
  • inheritdoc

    Parameters

    • args: ModifierMouseArgs

    Returns void

onDragEnded

  • onDragEnded(): void
  • inheritdoc

    Returns void

onDragStarted

  • onDragStarted(args: ModifierMouseArgs): boolean
  • inheritdoc

    Parameters

    • args: ModifierMouseArgs

    Returns boolean

Protected resizeBrushCacheCollection

  • resizeBrushCacheCollection(caches: BrushCache[], count: number): void
  • Resizes a brush-cache collection to the required count.

    Parameters

    • caches: BrushCache[]
    • count: number

    Returns void

Protected resizePenCacheCollection

  • resizePenCacheCollection(caches: Pen2DCache[], count: number): void
  • Resizes a pen-cache collection to the required count.

    Parameters

    • caches: Pen2DCache[]
    • count: number

    Returns void

Protected resolveAxisLabelCoordGroups

Protected resolveAxisLabelCoords

  • resolveAxisLabelCoords(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number[]
  • Resolves axis coordinates for labels with anchorMode: Axis in series-view-rect pixels.

    Parameters

    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase

    Returns number[]

Protected resolveBrushFromCache

  • resolveBrushFromCache(cache: BrushCache | undefined, opacity: number, canDraw?: boolean): IBrush2D | undefined
  • Resolves a brush from cache and reapplies opacity.

    Parameters

    • cache: BrushCache | undefined
    • opacity: number
    • Default value canDraw: boolean = true

    Returns IBrush2D | undefined

Protected resolveConnectorLine

  • resolveConnectorLine(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, localClipRect: Rect): TLineSegment | undefined
  • Returns the line segment between point 1 and point 2, clipped to the visible rect.

    Parameters

    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase
    • localClipRect: Rect

    Returns TLineSegment | undefined

Protected resolveDragValue

  • resolveDragValue(defaultValue: Point): Point
  • Resolves the value-space drag target for the current active drag point.

    Parameters

    • defaultValue: Point

    Returns Point

resolveInteractionCursor

  • resolveInteractionCursor(mousePoint?: Point): string | undefined
  • Returns the cursor resolved for current interaction state.

    Parameters

    • Optional mousePoint: Point

    Returns string | undefined

Protected resolveIntervalGeometry

  • resolveIntervalGeometry(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): { deltaPixelX: number; deltaValueX: number; point1: Point; point1Pixel: Point; point2: Point; point2Pixel: Point } | undefined
  • Resolves the control-point geometry used by repeated renderers.

    Parameters

    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase

    Returns { deltaPixelX: number; deltaValueX: number; point1: Point; point1Pixel: Point; point2: Point; point2Pixel: Point } | undefined

resolveLabelLayouts

Protected resolvePenFromCache

  • resolvePenFromCache(cache: Pen2DCache | undefined, thickness: number, opacity: number, canDraw?: boolean): IPen2D | undefined
  • Resolves a pen from cache and reapplies opacity.

    Parameters

    • cache: Pen2DCache | undefined
    • thickness: number
    • opacity: number
    • Default value canDraw: boolean = true

    Returns IPen2D | undefined

resolveSnap

Protected resolveSnapByMouse

  • resolveSnapByMouse(mousePoint: Point, fallbackValue: Point): TSnapResult
  • Resolves snap from a mouse point in canvas coordinates.

    Parameters

    • mousePoint: Point
    • fallbackValue: Point

    Returns TSnapResult

Protected resolveSnapFromDataPoint

Protected resolveSnapFromMousePoint

  • resolveSnapFromMousePoint(defaultValue: Point): TSnapResult

Protected resolveVisibleRepeatPoints

  • resolveVisibleRepeatPoints(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, localClipRect: Rect, extraHorizontalPaddingPx?: number): TRepeatedHorizontalIntervalPoint[]
  • Returns the visible repeated points, ordered by index.

    Parameters

    • xCalc: CoordinateCalculatorBase
    • yCalc: CoordinateCalculatorBase
    • localClipRect: Rect
    • Default value extraHorizontalPaddingPx: number = 0

    Returns TRepeatedHorizontalIntervalPoint[]

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 {@link 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 {@link 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

setPlacementPoints

  • setPlacementPoints(points: Point[]): void

setPointValue

  • setPointValue(index: number, point: Point): void

Protected setPointsInternal

  • setPointsInternal(points: Point[] | undefined, notify?: boolean): void
  • inheritdoc

    Parameters

    • points: Point[] | undefined
    • Default value notify: boolean = true

    Returns void

setRenderLayer

  • setRenderLayer(value: number | EDefaultRenderLayer): void
  • The render layer grouping within which the series will be draw. Defaults to EDefaultRenderLayer.AnnotationsAboveSeriesLayer

    Parameters

    • value: number | EDefaultRenderLayer

    Returns void

setRenderNextTo

  • setRenderNextTo(renderable: IOrderedRenderable | string, offset?: number): void
  • Parameters

    • renderable: IOrderedRenderable | string
    • Default value offset: number = 0

    Returns void

setRenderOrder

  • setRenderOrder(value: number): void

setSurfaceRenderOrder

  • setSurfaceRenderOrder(value: number): void
  • Allows an annotation to be treated as if it was drawn on a surface with a different draw order than its actual parent surface

    Parameters

    • value: number

    Returns void

Protected shouldRenderFill

  • shouldRenderFill(fill: string | null | undefined): boolean
  • Shared helper to test whether a fill brush should be rendered.

    Parameters

    • fill: string | null | undefined

    Returns boolean

Protected shouldRenderStroke

  • shouldRenderStroke(stroke: string | null | undefined): boolean
  • Shared helper to test whether a stroke should be rendered.

    Parameters

    • stroke: string | null | undefined

    Returns boolean

Protected shouldShowGrips

  • shouldShowGrips(): boolean

Protected shouldShowSelectionAdorner

  • shouldShowSelectionAdorner(): boolean

snapPlacementPoint

  • snapPlacementPoint(value: Point, mousePoint?: Point): Point

suspendInvalidate

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

    Returns void

svgStringAdornerTemplate

  • svgStringAdornerTemplate(): string

toJSON

  • toJSON(): { options: {}; type: EAnnotationType }
  • inheritdoc

    Returns { options: {}; type: EAnnotationType }

    • options: {}
    • type: EAnnotationType

translateAllPoints

  • translateAllPoints(deltaX: number, deltaY: number): void

Protected trySnapPointsOnInit

  • trySnapPointsOnInit(): void
  • Snaps initial points once after attach when enabled.

    Returns void

Protected updateAdornerInner

  • updateAdornerInner(): void
  • Updates adorner SVG for selected/hovered states.

    Returns void

Protected updateAnnotationBordersFromPixels

  • updateAnnotationBordersFromPixels(pixelPoints: Point[]): void

Protected updateBrushCache

  • updateBrushCache(cache: BrushCache | undefined, fill: string | null | undefined, opacity: number): BrushCache | undefined
  • Ensures and refreshes a brush cache.

    Parameters

    • cache: BrushCache | undefined
    • fill: string | null | undefined
    • opacity: number

    Returns BrushCache | undefined

Protected updateDragPointDefinitions

  • updateDragPointDefinitions(): void

Protected updateDragPointDefinitionsIfChanged

  • updateDragPointDefinitionsIfChanged(stateKey: string, factory: () => IDragPoint[]): void

Protected updatePenCache

  • updatePenCache(cache: Pen2DCache | undefined, stroke: string | undefined, thickness: number, opacity: number, strokeDashArray?: number[]): Pen2DCache | undefined
  • Ensures and refreshes a pen cache.

    Parameters

    • cache: Pen2DCache | undefined
    • stroke: string | undefined
    • thickness: number
    • opacity: number
    • Optional strokeDashArray: number[]

    Returns Pen2DCache | undefined

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