Options
All
  • Public
  • Public/Protected
  • All
Menu

A PolarPointerAnnotation presents an SVG pointer over the chart at 0, 0 coordinates

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Object literals

Constructors

constructor

Properties

Protected adornerClippingProperty

adornerClippingProperty: EAnnotationClippingMode | string = EAnnotationClippingMode.Chart

Protected adornerDraggingPointProperty

adornerDraggingPointProperty: EDraggingGripPoint

Protected annotationsGripsFillProperty

annotationsGripsFillProperty: string = SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBackgroundBrush

Protected annotationsGripsRadiusProperty

annotationsGripsRadiusProperty: number = ADORNER_GRIP_RADIUS

Protected annotationsGripsStrokeProperty

annotationsGripsStrokeProperty: string = SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBorderBrush

clicked

Protected clippingProperty

clippingProperty: EAnnotationClippingMode | string = EAnnotationClippingMode.SeriesViewRect

dragDelta

dragEnded

dragEnded: EventHandler<void>

Protected dragPointsProperty

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

dragStarted

dragStarted: EventHandler<void>

Protected horizontalAnchorPointProperty

horizontalAnchorPointProperty: EHorizontalAnchorPoint = EHorizontalAnchorPoint.Left

hovered

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

Protected invalidateState

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

Type declaration

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

isDeleted

isDeleted: boolean = false

Readonly isDomAnnotation

isDomAnnotation: boolean = true

Protected isHiddenProperty

isHiddenProperty: boolean = false

Readonly isSvgAnnotation

isSvgAnnotation: boolean = true
description

defines if the annotation is SVG annotation

Protected nextSibling

nextSibling: Element

Protected parentSurfaceProperty

parentSurfaceProperty: SciChartSurfaceBase

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

reDrawChartOnChange

reDrawChartOnChange: boolean = false

Protected renderLayerProperty

renderLayerProperty: EDefaultRenderLayer | number

Protected renderNextToProperty

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

Type declaration

Protected renderOrderProperty

renderOrderProperty: number = undefined

selectedChanged

selectedChanged: EventHandler<boolean>

Protected selectionBoxDeltaProperty

selectionBoxDeltaProperty: number = 1.5

Protected selectionBoxStrokeProperty

selectionBoxStrokeProperty: string = SciChartSurfaceBase.DEFAULT_THEME.annotationSelectionStroke

Protected selectionBoxThicknessProperty

selectionBoxThicknessProperty: number = 6

Protected sizeProperty

sizeProperty: Size

Protected surfaceRenderOrderProperty

surfaceRenderOrderProperty: number = undefined

Readonly surfaceTypes

surfaceTypes: ESurfaceType[] = [ESurfaceType.SciChartPolarSurfaceType]
description

compatible surface types. See EAnnotationType for a list of values

Protected svgAdorner

svgAdorner: SVGElement

Protected svgDOMRect

svgDOMRect: DOMRect

Readonly type

type: SVGPolarPointerAnnotation = EAnnotationType.SVGPolarPointerAnnotation
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 x1Property

x1Property: number

Protected xCoordShiftProperty

xCoordShiftProperty: number = 0

Protected xCoordSvgTransProperty

xCoordSvgTransProperty: number = 0

Protected xCoordinateModeProperty

xCoordinateModeProperty: ECoordinateMode = ECoordinateMode.DataValue

Protected y1Property

y1Property: number

Protected yCoordShiftProperty

yCoordShiftProperty: number = 0

Protected yCoordSvgTransProperty

yCoordSvgTransProperty: number = 0

Protected yCoordinateModeProperty

yCoordinateModeProperty: ECoordinateMode = ECoordinateMode.DataValue

Accessors

adornerClipping

adornerDraggingPoint

annotationLayer

annotationsGripsFill

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

annotationsGripsRadius

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

annotationsGripsStroke

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

clipping

dragPoints

horizontalAnchorPoint

isDraggingStarted

  • get isDraggingStarted(): boolean

isEditable

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

isHidden

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

isHovered

  • get isHovered(): boolean
  • set isHovered(value: boolean): void
  • Defines if the entity is hovered

    inheritdoc

    Returns boolean

  • Defines if the entity is hovered

    inheritdoc

    Parameters

    • value: boolean

    Returns void

isSelected

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

isStrokeAboveCenter

  • get isStrokeAboveCenter(): boolean
  • set isStrokeAboveCenter(value: boolean): void
  • Whether the pointer stick should be above or below the center circle

    Returns boolean

  • Whether the pointer stick should be above or below the center circle

    Parameters

    • value: boolean

    Returns void

isVerticalChart

  • get isVerticalChart(): boolean

isVisible

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

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

pointerArrowStyle

  • get pointerArrowStyle(): { fill?: string; headDepth?: number; height?: number; stroke?: string; strokeWidth?: number; width?: number }
  • set pointerArrowStyle(value: TPointerArrowStyle): void
  • Gets or sets the style of the pointer arrow as a TPointerArrowStyle object To customise the pointer arrow fully, override getPointerArrowSvg

    Returns { fill?: string; headDepth?: number; height?: number; stroke?: string; strokeWidth?: number; width?: number }

    • Optional fill?: string

      Sets the pointer circle background color as an HTML Color code

      Default = none

    • Optional headDepth?: number

      The depth of the pointer arrow head, relative to the arrow height, NOT the pointer length

      Properties should be between 0 and 1 inclusive

      Default = 1

      note

      If value is 2, the arrow depth will be twice the height, thus creating a rhombus shape, anything above that will get closer to the center of the arrow

    • Optional height?: number

      The height of the pointer arrow, relative to the pointer length

      Properties must be between 0 and 1 inclusive

      Example: 0.1 means 10% of the length of the pointer (given by the y1 property)

      Default = 0.1

    • Optional stroke?: string

      Sets the pointer circle border color as an HTML Color code

      Default = black

    • Optional strokeWidth?: number

      Sets the stroke-width of the pointer circle, in pixels

      Default = 3

    • Optional width?: number

      The width of the pointer arrow, relative to the pointer length

      Properties must be between 0 and 1 inclusive

      Example: 0.1 means 10% of the length of the pointer (given by the y1 property)

      Default = 0

  • Gets or sets the style of the pointer arrow as a TPointerArrowStyle object To customise the pointer arrow fully, override getPointerArrowSvg

    Parameters

    Returns void

pointerCenterStyle

  • get pointerCenterStyle(): { fill?: string; size?: number; stroke?: string; strokeWidth?: number }
  • set pointerCenterStyle(value: TPointerCenterStyle): void
  • Gets or sets the style of the pointer center circle as a TPointerStyle object To customise the pointer center fully, override getPointerCenterSvg

    Returns { fill?: string; size?: number; stroke?: string; strokeWidth?: number }

    • Optional fill?: string

      Sets the pointer circle background color as an HTML Color code

      Default = gray

    • Optional size?: number

      The size of the pointer circle (diameter)

      Properties must be between 0 and 1 inclusive

      Example: 0.1 means 10% of the length of the pointer (given by the y1 property)

      Default = 0

    • Optional stroke?: string

      Sets the pointer circle border color as an HTML Color code

      Default = black

    • Optional strokeWidth?: number

      Sets the stroke-width of the pointer circle, in pixels

      Default = 3

  • Gets or sets the style of the pointer center circle as a TPointerStyle object To customise the pointer center fully, override getPointerCenterSvg

    Parameters

    Returns void

pointerStyle

  • get pointerStyle(): { backExtensionSize?: number; baseSize?: number; fill?: string; stroke?: string; strokeWidth?: number }
  • set pointerStyle(value: TPointerStyle): void
  • Gets or sets the style of the pointer center circle as a TPointerStyle object To customise the pointer fully, override getPointerStickSvg

    Returns { backExtensionSize?: number; baseSize?: number; fill?: string; stroke?: string; strokeWidth?: number }

    • Optional backExtensionSize?: number

      The size of the back extension of the pointer stick

      Properties must be between 0 and 1 inclusive

      Example: 0.1 means 10% of the length of the pointer (given by the y1 property)

      Default = 0

      note

      if your value is in between [-1, 0], the main pointer base will be placed further away from the centerpoint the closer the value is to -1.

    • Optional baseSize?: number

      The size of the pointer stick base

      Properties must be between 0 and 1 inclusive

      Example: 0.1 means 10% of the length of the pointer (given by the y1 property)

      Default = 0.1

    • Optional fill?: string

      Sets the pointer stick background color as an HTML Color code

      Default = gray

    • Optional stroke?: string

      Sets the pointer stick border color as an HTML Color code

      Default = black

    • Optional strokeWidth?: number

      Sets the stroke-width of the pointer stick, in pixels

      Default = 3

  • Gets or sets the style of the pointer center circle as a TPointerStyle object To customise the pointer fully, override getPointerStickSvg

    Parameters

    Returns void

resizeDirections

selectionBoxDelta

  • get selectionBoxDelta(): number
  • set selectionBoxDelta(delta: number): void
  • How much bigger the selection box is than the bounding box of the annotation, in pixels

    inheritdoc

    Returns number

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

    inheritdoc

    Parameters

    • delta: number

    Returns void

selectionBoxStroke

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

selectionBoxThickness

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

strokeLineJoin

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

verticalAnchorPoint

x1

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

x2

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

xAxis

xAxisId

  • get xAxisId(): string | undefined
  • 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

yAxis

yAxisId

  • get yAxisId(): string | undefined
  • 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 applyClipping

Protected applyPixelRatioToDragDist

  • applyPixelRatioToDragDist(dist: number): number

Protected applySvgClipping

Protected calcAndSetAnnotationBorders

calcDragDistance

  • calcDragDistance(xyValues: Point): void

canDragPoint

checkIsClickedOnAnnotation

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

Protected checkIsClickedOnAnnotationInternal

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

checkIsPointWithinClipArea

  • checkIsPointWithinClipArea(mousePoint: Point): boolean

checkIsWithinBounds

Protected clear

  • clear(): void
  • Returns void

click

  • Called internally. Send a click to the annotation if the point is in bounds, raising the clicked event and optionally selecting the annotation.

    Parameters

    Returns boolean

clickToSelect

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

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 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 }

getAnnotationBorders

  • getAnnotationBorders(ordered?: boolean, notScaled?: boolean): { x1: number; x2: number; y1: number; y2: number }
  • Gets the annotation borders in real, pixel coordinates relative to the master html element containing the surface.

    example

    // Say we have a data-value of "15" on the chart's xAxis. // Step 1: We calculate the screen coordinate of it via the coordinateCalculator (or take it from our stored annotationBorders property), // Step 2: Multiply that value by DpiHelper.PIXEL_RATIO // Step 3: Add the already-scaled {xCoordSvgTrans} value to get the real coordinate on the SVG canvas.

    note

    This process is done for all 4 borders x1, x2, y1, y2.

    Parameters

    • Optional ordered: boolean
    • Optional notScaled: boolean

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

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

getAnnotationGripSvg

  • getAnnotationGripSvg(x: number, y: number): string
  • Get svg for the adorner grip handles for standard annotations

    Parameters

    • x: number
    • y: number

    Returns string

Protected getClipPath

getClippingRect

Protected getCoordinate

getPointerArrowSvg

  • getPointerArrowSvg(pointerLength: number, height: number, width: number, headDepth: number): string
  • Parameters

    • pointerLength: number
    • height: number
    • width: number
    • headDepth: number

    Returns string

getPointerCenterSvg

  • getPointerCenterSvg(pointerLength: number, centerSize: number): string
  • Parameters

    • pointerLength: number
    • centerSize: number

    Returns string

getPointerStickSvg

  • getPointerStickSvg(pointerLength: number, pointerWidth: number, backExtensionSize: number): string
  • Parameters

    • pointerLength: number
    • pointerWidth: number
    • backExtensionSize: number

    Returns string

getRenderLayer

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

    Returns number

getRenderNextTo

getRenderOrder

  • getRenderOrder(): number

Protected getResolvedCoordinate

Protected getSize

  • getSize(): { height: number; width: number }

Protected getState

  • getState(): { axisSize: number; direction: number; seriesViewRect: Rect; startAngle: number }
  • Returns { axisSize: number; direction: number; seriesViewRect: Rect; startAngle: number }

    • axisSize: number
    • direction: number
    • seriesViewRect: Rect
    • startAngle: number

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 getSvgDomRect

  • getSvgDomRect(): DOMRect

getSvgString

  • This is called to get the svg string to use. Override this to customise the svg string for each render

    Parameters

    Returns string

Protected getValue

Protected getValuesFromCoordinates

  • getValuesFromCoordinates(point: Point, translateToSeriesViewRect: boolean): Point

Protected getX1Coordinate

Protected getX2Coordinate

Protected getXYCoordinatesFromValues

  • getXYCoordinatesFromValues(xyDataPoint: Point): Point

Protected getY1Coordinate

Protected getY2Coordinate

hover

linkAxes

  • linkAxes(): void

Protected notifyPropertyChanged

  • notifyPropertyChanged(propertyName: string): void

onAttach

onDetach

  • onDetach(): void

onDpiChanged

onDragAdorner

onDragEnded

  • onDragEnded(): void

onDragStarted

resumeInvalidate

  • resumeInvalidate(): void

Protected selectLayerRoot

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

setRenderLayer

  • The render layer grouping within which the series will be draw. Defaults to EDefaultRenderLayer.AnnotationsAboveSeriesLayer

    Parameters

    Returns void

setRenderNextTo

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

svgStringAdornerTemplate

  • svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string

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