Options
All
  • Public
  • Public/Protected
  • All
Menu

API Documentation for SciChart Financial Tools - v5.2.0

Go to JavaScript Charting Documentation
Go to JavaScript Chart Examples
Go to SciChart.js on Github

Index

Enumerations

Classes

Interfaces

Type aliases

Functions

Type aliases

IMultiPointLabelDefinition

A label definition attached to a point, segment or axis.

TAnnotationEditorFieldType

TAnnotationEditorFieldType: "color" | "number" | "boolean" | "enum" | "text"

TAnnotationEditorFieldValue

TAnnotationEditorFieldValue: string | number | boolean | null | undefined

TAnnotationEditorSelectOption

TAnnotationEditorSelectOption: { label: string; value: string | number | boolean }

Type declaration

  • label: string
  • value: string | number | boolean

TAnnotationVisibilityModeLike

TAnnotationVisibilityModeLike: "Always" | "OnInteraction" | "Hidden"

TAxisLabelDrawModeLike

TAxisLabelDrawModeLike: "X" | "Y" | "Both"

TAxisMultiPointLabel

TAxisMultiPointLabel: TMultiPointLabelBase & { anchorMode: Axis; axisLabelDrawMode?: EAxisLabelDrawMode } & { pointIndex?: number } | { segmentEndIndex?: number; segmentLabelRotationMode?: ESegmentLabelRotationMode; segmentRatio?: number; segmentStartIndex?: number }

Label definition drawn on an axis at a point's coordinate.

TChannelGeometry

TChannelGeometry: { bottomLine?: TLineSegment; midLine?: TLineSegment; quad?: TQuad; topLine?: TLineSegment }

Type declaration

TCornerResizeState

TCornerResizeState: { anchorPoint: Point; aspectRatio: number | undefined; corner: EDraggingGripPoint; kind: "corner"; normalizedPoints: Point[]; startBounds: TValueBounds }

Type declaration

  • anchorPoint: Point
  • aspectRatio: number | undefined
  • corner: EDraggingGripPoint
  • kind: "corner"
  • normalizedPoints: Point[]
  • startBounds: TValueBounds

TEdgeResizeState

TEdgeResizeState: { edge: TOutlineEdge; kind: "edge"; normalizedPoints: Point[]; startBounds: TValueBounds }

Type declaration

TFibonacciGeometry

TFibonacciGeometry: { borderPoints: Point[]; connectorLine?: TLineSegment; levels: TFibonacciLevelGeometry[]; regions: TFibonacciRegionGeometry[] }

Type declaration

TFibonacciLevelGeometry

TFibonacciLevelGeometry: { color: string; endPixel: Point; label: string; labelColor: string; labelHorizontalAnchor: EHorizontalAnchorPoint; labelPoint: Point; labelRotation: number; labelVerticalAnchor: EVerticalAnchorPoint; line?: TLineSegment; startPixel: Point; text: string; threshold: number }

Type declaration

  • color: string
  • endPixel: Point
  • label: string
  • labelColor: string
  • labelHorizontalAnchor: EHorizontalAnchorPoint
  • labelPoint: Point
  • labelRotation: number
  • labelVerticalAnchor: EVerticalAnchorPoint
  • Optional line?: TLineSegment
  • startPixel: Point
  • text: string
  • threshold: number

TFibonacciLevelLabelFormatParams

TFibonacciLevelLabelFormatParams: { labelValuePoint: Point; lineEndValue: Point; lineStartValue: Point; threshold: number; thresholdLabel: string; value: number; valueLabel: string }

Type declaration

  • labelValuePoint: Point
  • lineEndValue: Point
  • lineStartValue: Point
  • threshold: number
  • thresholdLabel: string
  • value: number
  • valueLabel: string

TFibonacciLevelLabelFormatter

TFibonacciLevelLabelFormatter: (params: TFibonacciLevelLabelFormatParams) => string

Type declaration

TFibonacciRegionGeometry

TFibonacciRegionGeometry: { color: string; quad: [] }

Type declaration

  • color: string
  • quad: []

TLineSegment

TLineSegment: []

TMeasureGeometry

TMeasureGeometry: { borderPoints: Point[]; bottom: number; centerX: number; centerY: number; horizontalLine?: TLineSegment; isGrowing: boolean; left: number; point1Pixel: Point; point1Value: Point; point2Pixel: Point; point2Value: Point; right: number; top: number; verticalLine?: TLineSegment }

Type declaration

  • borderPoints: Point[]
  • bottom: number
  • centerX: number
  • centerY: number
  • Optional horizontalLine?: TLineSegment
  • isGrowing: boolean
  • left: number
  • point1Pixel: Point
  • point1Value: Point
  • point2Pixel: Point
  • point2Value: Point
  • right: number
  • top: number
  • Optional verticalLine?: TLineSegment

TMeasureLabelData

TMeasureLabelData: { bars: number; deltaX: number; deltaY: number; isGrowing: boolean; percentChange: number; point1: Point; point2: Point; scaledDeltaY: number }

Type declaration

  • bars: number
  • deltaX: number
  • deltaY: number
  • isGrowing: boolean
  • percentChange: number
  • point1: Point
  • point2: Point
  • scaledDeltaY: number

TMeasureLabelDataTemplate

TMeasureLabelDataTemplate: (params: TMeasureLabelTemplateParams) => string[] | string

Template for measure label text lines.

Type declaration

TMeasureLabelTemplateParams

TMeasureLabelTemplateParams: TMeasureLabelData & { defaultLabelLines: string[]; defaultLabelText: string }

TMultiPointAnnotationBaseInheritedOptions

TMultiPointAnnotationBaseInheritedOptions: Omit<IAnnotationBaseOptions, "x1" | "x2" | "y1" | "y2">

TMultiPointLabelAnchorModeLike

TMultiPointLabelAnchorModeLike: "Point" | "Segment" | "Axis"

TMultiPointLabelBase

TMultiPointLabelBase: { alignment?: ETextAlignment; color?: string; fontFamily?: string; fontSize?: number; fontStyle?: string; fontWeight?: string; horizontalTextPosition?: EHorizontalTextPosition; id?: string; lineHeight?: number; lineSpacing?: number; multiLineAlignment?: EMultiLineAlignment; padding?: Thickness; text?: string; verticalTextPosition?: EVerticalTextPosition; xOffset?: number; yOffset?: number }

Base label definition shared by point, segment and axis labels.

Type declaration

  • Optional alignment?: ETextAlignment

    Horizontal label alignment around anchor point.

  • Optional color?: string

    Label text color. Defaults to current theme tick text color.

  • Optional fontFamily?: string

    Label font family.

  • Optional fontSize?: number

    Label font size in CSS pixels.

  • Optional fontStyle?: string

    Label font style, e.g. "normal", "italic".

  • Optional fontWeight?: string

    Label font weight, e.g. "400", "500", "bold".

  • Optional horizontalTextPosition?: EHorizontalTextPosition

    Horizontal placement of the label relative to its anchor.

  • Optional id?: string

    Optional id used by caller code.

  • Optional lineHeight?: number

    Target line height in pixels. Overrides lineSpacing when set.

  • Optional lineSpacing?: number

    Extra spacing between text lines. If in (0,1), treated as a multiplier of line height.

  • Optional multiLineAlignment?: EMultiLineAlignment

    Horizontal alignment for multiline label text.

  • Optional padding?: Thickness

    Optional text padding (applies to point/segment labels; axis labels use axisLabelPadding).

  • Optional text?: string

    Used for STATIC label text.

    note

    For dynamic label data, use MultiPointAnnotationBase.formatLabel callback.

    note

    Ignored when anchorMode: Axis or formatLabel is defined.

  • Optional verticalTextPosition?: EVerticalTextPosition

    Vertical placement of the label relative to its anchor.

  • Optional xOffset?: number

    Extra x offset in pixels for non-axis labels (Point/Segment).

  • Optional yOffset?: number

    Extra y offset in pixels for non-axis labels (Point/Segment).

TMultiPointLabelFormatter

TMultiPointLabelFormatter: (params: IMultiPointLabelFormatParams) => string

Custom formatter for multi-point labels.

Type declaration

TMultiPointLabelStyle

TMultiPointLabelStyle: Partial<Pick<IMultiPointLabelDefinition, "color" | "alignment" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "lineSpacing" | "lineHeight" | "multiLineAlignment" | "padding">>

Style overrides for resolved point/segment labels.

TMultiPointLabelStyleFormatter

TMultiPointLabelStyleFormatter: (params: IMultiPointLabelStyleFormatParams) => TMultiPointLabelStyle | undefined

Custom style formatter for multi-point labels.

Type declaration

TMultiPointLabelStyleLike

TMultiPointLabelStyleLike: Partial<Pick<IMultiPointLabelDefinitionLike, "color" | "alignment" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "lineSpacing" | "lineHeight" | "multiLineAlignment" | "padding">>

TMultiPointResolvedLabel

TMultiPointResolvedLabel: { alignment: ETextAlignment; color?: string; fontFamily: string; fontSize: number; fontStyle?: string; fontWeight?: string; id?: string; lineHeight?: number; lineSpacing?: number; multiLineAlignment?: EMultiLineAlignment; padding?: Thickness; rotation: number; text: string; x: number; y: number }

A computed label layout item in pixel coordinates.

Type declaration

  • alignment: ETextAlignment

    Horizontal label alignment around anchor point.

  • Optional color?: string

    Label text color override.

  • fontFamily: string

    Label font family.

  • fontSize: number

    Label font size in CSS pixels.

  • Optional fontStyle?: string

    Label font style, e.g. "normal", "italic". Default "normal"

  • Optional fontWeight?: string

    Label font weight, e.g. "400", "500", "bold". Default "500"

  • Optional id?: string

    Original label id.

  • Optional lineHeight?: number

    Target line height in pixels.

  • Optional lineSpacing?: number

    Extra spacing between text lines.

  • Optional multiLineAlignment?: EMultiLineAlignment

    Horizontal alignment for multiline label text.

  • Optional padding?: Thickness

    Optional text padding used by native text positioning.

  • rotation: number

    Rotation in degrees.

  • text: string

    Original label text.

  • x: number

    X coordinate in series-view-rect pixels.

  • y: number

    Y coordinate in series-view-rect pixels.

TMultiPointResolvedLabelLike

TMultiPointResolvedLabelLike: { alignment: ETextAlignment; color?: string; fontFamily: string; fontSize: number; fontStyle?: string; fontWeight?: string; id?: string; lineHeight?: number; lineSpacing?: number; multiLineAlignment?: EMultiLineAlignment; padding?: Thickness; rotation: number; text: string; x: number; y: number }

Type declaration

  • alignment: ETextAlignment
  • Optional color?: string
  • fontFamily: string
  • fontSize: number
  • Optional fontStyle?: string
  • Optional fontWeight?: string
  • Optional id?: string
  • Optional lineHeight?: number
  • Optional lineSpacing?: number
  • Optional multiLineAlignment?: EMultiLineAlignment
  • Optional padding?: Thickness
  • rotation: number
  • text: string
  • x: number
  • y: number

TOutlineEdge

TOutlineEdge: "minX" | "maxX" | "minY" | "maxY"

TPitchforkGeometry

TPitchforkGeometry: { fullWidthZone?: TQuad; fullWidthZonePolygon?: Point[]; halfWidthZone?: TQuad; halfWidthZonePolygon?: Point[]; handleRay?: TLineSegment; lineSegments?: TLineSegment[]; shoulderLine?: TLineSegment }

Type declaration

  • Optional fullWidthZone?: TQuad
  • Optional fullWidthZonePolygon?: Point[]
  • Optional halfWidthZone?: TQuad
  • Optional halfWidthZonePolygon?: Point[]
  • Optional handleRay?: TLineSegment
  • Optional lineSegments?: TLineSegment[]
  • Optional shoulderLine?: TLineSegment

TPlacementAnnotationOptions

TPlacementAnnotationOptions: IAnnotationPlacementTypeMap[TPlacementAnnotationType]

Union of supported options for placement modifier.

TPlacementAnnotationType

TPlacementAnnotationType: keyof IAnnotationPlacementTypeMap

Union of supported annotation types for placement modifier.

TPnfDirection

TPnfDirection: -1 | 0 | 1

TPointAndFigureMarkWithType

TPointAndFigureMarkWithType: { columnIndex: number; price: number; symbolType: EPointAndFigureSymbolType }

Type declaration

TPointMultiPointLabel

TPointMultiPointLabel: TMultiPointLabelBase & { anchorMode?: Point; pointIndex?: number }

Label definition attached to a specific annotation point.

TQuad

TQuad: []

TRenkoDirection

TRenkoDirection: -1 | 0 | 1

TResizeState

TResolvedAnchor

TResolvedAnchor: { anchorX: number; anchorY: number; tangentX: number; tangentY: number }

Type declaration

  • anchorX: number
  • anchorY: number
  • tangentX: number
  • tangentY: number

TResolvedAnnotationEditorField

TResolvedAnnotationEditorField: { field: IAnnotationEditorField; value: TAnnotationEditorFieldValue }

Type declaration

TResolvedAxisAnchoredLabelCoords

TResolvedAxisAnchoredLabelCoords: { xAxisCoords: number[]; yAxisCoords: number[] }

Type declaration

  • xAxisCoords: number[]
  • yAxisCoords: number[]

TScreenEdgeSegment

TScreenEdgeSegment: { end: Point; start: Point }

Type declaration

  • end: Point
  • start: Point

TSegmentLabelRotationModeLike

TSegmentLabelRotationModeLike: "Parallel" | "Perpendicular"

TSegmentMultiPointLabel

TSegmentMultiPointLabel: TMultiPointLabelBase & { anchorMode: Segment; segmentEndIndex?: number; segmentLabelRotationMode?: ESegmentLabelRotationMode; segmentRatio?: number; segmentStartIndex?: number }

Label definition attached to a segment between two annotation points.

TSnapResult

TSnapResult: { isSnapped: boolean; value: Point }

Result of snap resolution used by drag points.

Type declaration

  • isSnapped: boolean

    When true, the drag point should snap to the provided value instead of the current drag position.

  • value: Point

TStopLossTakeProfitGeometry

TStopLossTakeProfitGeometry: { borderPoints: Point[]; bottom: number; bottomLine: TLineSegment; isTakeProfit: boolean; left: number; right: number; top: number; topLine: TLineSegment }

Type declaration

  • borderPoints: Point[]
  • bottom: number
  • bottomLine: TLineSegment
  • isTakeProfit: boolean
  • left: number
  • right: number
  • top: number
  • topLine: TLineSegment

TValueBounds

TValueBounds: { height: number; maxX: number; maxY: number; minX: number; minY: number; width: number }

Type declaration

  • height: number
  • maxX: number
  • maxY: number
  • minX: number
  • minY: number
  • width: number

Functions

Const appendOBoxes

  • appendOBoxes(target: IPointAndFigureMark[], columnIndex: number, startPrice: number, boxes: number, boxSize: number): void
  • Parameters

    • target: IPointAndFigureMark[]
    • columnIndex: number
    • startPrice: number
    • boxes: number
    • boxSize: number

    Returns void

Const appendXBoxes

  • appendXBoxes(target: IPointAndFigureMark[], columnIndex: number, startPrice: number, boxes: number, boxSize: number): void
  • Parameters

    • target: IPointAndFigureMark[]
    • columnIndex: number
    • startPrice: number
    • boxes: number
    • boxSize: number

    Returns void

Const asCoreAnnotationType

  • asCoreAnnotationType(type: string): EAnnotationType
  • Parameters

    • type: string

    Returns EAnnotationType

Const calculateDefaultPriceStep

  • calculateDefaultPriceStep(values: ArrayLike<number>, targetBoxCount?: number): number
  • Returns a rounded 1/2/5/10 price step from finite values. Default target box count 50.

    Parameters

    • values: ArrayLike<number>
    • Default value targetBoxCount: number = 50

    Returns number

Const calculatePointAndFigureFromClose

  • Calculates Point & Figure marks from close prices.

    If boxSize is omitted, the calculator derives a rounded price step from the finite close range so the result is useful without instrument-specific setup. If reversalAmount is omitted, the standard three-box reversal is used. Default 3.

    Parameters

    • closeValues: number[]
    • Optional boxSize: number
    • Default value reversalAmount: number = 3

    Returns IPointAndFigureCalculationResult

Const clipExtendedSegmentToRect

  • clipExtendedSegmentToRect(start: Point, end: Point, rect: Rect, extendStart: boolean, extendEnd: boolean): TLineSegment | undefined
  • Clips the segment [start,end] with optional extension on either side. When extension is enabled, the segment becomes a line/ray in that direction.

    Parameters

    • start: Point
    • end: Point
    • rect: Rect
    • extendStart: boolean
    • extendEnd: boolean

    Returns TLineSegment | undefined

Const clipForwardRayToRect

  • clipForwardRayToRect(origin: Point, direction: Point, rect: Rect): TLineSegment | undefined
  • Clips a forward ray that starts at origin and moves along direction.

    Parameters

    • origin: Point
    • direction: Point
    • rect: Rect

    Returns TLineSegment | undefined

Const clipParametricLineToRect

  • clipParametricLineToRect(origin: Point, direction: Point, rect: Rect, minT: number, maxT: number): TLineSegment | undefined
  • Clips a parametric line p(t) = origin + t * direction to the supplied rect and optional t-range. Returns segment endpoints in pixel coordinates when visible.

    Parameters

    • origin: Point
    • direction: Point
    • rect: Rect
    • minT: number
    • maxT: number

    Returns TLineSegment | undefined

Const clipSegmentToRect

  • clipSegmentToRect(start: Point, end: Point, rect: Rect): TLineSegment | undefined
  • Clips a finite segment [start,end] to the rect.

    Parameters

    • start: Point
    • end: Point
    • rect: Rect

    Returns TLineSegment | undefined

Const clonePoints

  • clonePoints(points: Point[] | undefined): Point[]
  • Parameters

    • points: Point[] | undefined

    Returns Point[]

Const compareSegmentLabelNormals

  • compareSegmentLabelNormals(first: Point, second: Point): number
  • Parameters

    • first: Point
    • second: Point

    Returns number

Const copyThickness

  • copyThickness(value: Thickness): Thickness
  • Parameters

    • value: Thickness

    Returns Thickness

Const countBoxesDown

  • countBoxesDown(price: number, reference: number, boxSize: number): number
  • Parameters

    • price: number
    • reference: number
    • boxSize: number

    Returns number

Const countBoxesUp

  • countBoxesUp(price: number, reference: number, boxSize: number): number
  • Parameters

    • price: number
    • reference: number
    • boxSize: number

    Returns number

Const isLabelVisibilityActive

  • isLabelVisibilityActive(visibility: TAnnotationVisibilityModeLike | string | undefined, input: { isDragging: boolean; isHovered: boolean; isSelected: boolean }): boolean
  • Parameters

    • visibility: TAnnotationVisibilityModeLike | string | undefined
    • input: { isDragging: boolean; isHovered: boolean; isSelected: boolean }
      • isDragging: boolean
      • isHovered: boolean
      • isSelected: boolean

    Returns boolean

Const isPointInTriangle

  • isPointInTriangle(point: Point, a: Point, b: Point, c: Point): boolean
  • Tests whether a point is inside (or on edge of) a triangle.

    Parameters

    • point: Point
    • a: Point
    • b: Point
    • c: Point

    Returns boolean

Const isPointInsideQuad

  • isPointInsideQuad(point: Point, quad: TQuad): boolean
  • Tests whether a point is inside a quad interpreted as a triangle strip: [p1, p2, p3, p4] => triangles (p1,p2,p3) and (p2,p3,p4).

    Parameters

    • point: Point
    • quad: TQuad

    Returns boolean

Const normalizeAnchorMode

Const normalizeAxisLabelDrawMode

Const normalizeLabelAlignment

  • normalizeLabelAlignment(value: ETextAlignment | undefined, fallback: ETextAlignment): ETextAlignment
  • Parameters

    • value: ETextAlignment | undefined
    • fallback: ETextAlignment

    Returns ETextAlignment

Const normalizeLabelFontSize

  • normalizeLabelFontSize(value: number | undefined, fallback: number): number
  • Parameters

    • value: number | undefined
    • fallback: number

    Returns number

Const normalizeReadableLabelRotation

  • normalizeReadableLabelRotation(rotationDeg: number): number
  • Parameters

    • rotationDeg: number

    Returns number

Const quantizeToBox

  • quantizeToBox(value: number, boxSize: number): number
  • Parameters

    • value: number
    • boxSize: number

    Returns number

Const resolveAxisAnchoredLabelCoords

Const resolveEffectiveLabelAnchorMode

Const resolveFormattedLabelStyle

Const resolveFormattedLabelText

  • Parameters

    Returns string | undefined

Const resolveLabelAnchor

Const resolveLabelPadding

  • resolveLabelPadding(value: Thickness | undefined, fallback: Thickness): Thickness
  • Parameters

    • value: Thickness | undefined
    • fallback: Thickness

    Returns Thickness

Const resolveLabelPositionOffset

  • resolveLabelPositionOffset(horizontalPosition: EHorizontalTextPosition, verticalPosition: EVerticalTextPosition, effectiveAnchorMode: TMultiPointLabelAnchorModeLike, tangentX: number, tangentY: number): Point
  • Parameters

    • horizontalPosition: EHorizontalTextPosition
    • verticalPosition: EVerticalTextPosition
    • effectiveAnchorMode: TMultiPointLabelAnchorModeLike
    • tangentX: number
    • tangentY: number

    Returns Point

Const resolveLabelRotation

Const resolveMultiPointLabelLayouts

Const resolveNormalizedVector

  • resolveNormalizedVector(x: number, y: number): Point | undefined
  • Parameters

    • x: number
    • y: number

    Returns Point | undefined

Const resolvePointAnchor

Const resolveSegmentAnchor

Const resolveStableSegmentLabelNormal

  • resolveStableSegmentLabelNormal(tangentX: number, tangentY: number): Point | undefined
  • Parameters

    • tangentX: number
    • tangentY: number

    Returns Point | undefined

Const toSeriesViewLocalClipRect

  • toSeriesViewLocalClipRect(clipRect: Rect, seriesViewRect: Rect): Rect
  • Converts an absolute canvas clip-rect into series-view local coordinates.

    Parameters

    • clipRect: Rect
    • seriesViewRect: Rect

    Returns Rect

Generated using TypeDoc