Options
All
  • Public
  • Public/Protected
  • All
Menu

API Documentation for SciChart.js - v1.3.1511

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

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

SuspendedInstance

SuspendedInstance: { id: string; suspendCount: number; suspendable: ISuspendable }

Internal type used to track suspendable instances and number of nested suspend calls

Type declaration

TArgb

TArgb: { blue: number; green: number; opacity: number; red: number }

Type declaration

  • blue: number
  • green: number
  • opacity: number
  • red: number

TAxisCubeState

TAxisCubeState: { xVisibleMax: number; xVisibleMin: number; xWorldDimension: number; yVisibleMax: number; yVisibleMin: number; yWorldDimension: number; zVisibleMax: number; zVisibleMin: number; zWorldDimension: number }

A type class to contain information about the current state of 3D Axis Cube, such is Visible Range or World Dimensions.

Type declaration

  • xVisibleMax: number
  • xVisibleMin: number
  • xWorldDimension: number
  • yVisibleMax: number
  • yVisibleMin: number
  • yWorldDimension: number
  • zVisibleMax: number
  • zVisibleMin: number
  • zWorldDimension: number

TBorder

TBorder: { border?: number; borderBottom?: number; borderLeft?: number; borderRight?: number; borderTop?: number; color?: string }

A Border applied to the series viewport, axes or the entire chart surface

Type declaration

  • Optional border?: number
  • Optional borderBottom?: number
  • Optional borderLeft?: number
  • Optional borderRight?: number
  • Optional borderTop?: number
  • Optional color?: string

TCategoryCoordCalc

TContourLineStyle

TContourLineStyle: { color?: string; strokeThickness?: number }

A type class to contain information about contour line styles

remarks

A contour line is drawn using the UniformContoursRenderableSeries with a 2D array of data

  • Set the color as an HTML Color code to define the color
  • Set the strokeThickness to change the thickness of the contour line

Type declaration

  • Optional color?: string
  • Optional strokeThickness?: number

TDrawFunction

TDrawFunction: () => void

Type declaration

    • (): void
    • Returns void

TEasing

TEasing: (time: number) => number

An easing function used in animations through SciChart. See easing for a list of values

Type declaration

    • (time: number): number
    • Parameters

      • time: number

      Returns number

TElement

TElement: { arg: any[]; name: string }

Type declaration

  • arg: any[]
  • name: string

TGradientStop

TGradientStop: { color: string; offset: number }

A Gradient stop applied to gradients on lines, fills thoughout SciChart

Type declaration

  • color: string

    The gradient stop color as an HTML color code

  • offset: number

    The gradient offset. Allowable values are in the range 0 to 1

TGridLineStyle

TGridLineStyle: { color?: string; strokeDasharray?: number[]; strokeThickness?: number }

A type class to contain information about gridline styles

remarks

A grid line is the X Y axis grid inside the chart

  • Set the color as an HTML Color code to define the color
  • Set the strokeThickness to change the thickness of the grid line
  • Set the strokeDasharray to define dash pattern, e.g. [2,2] will have a 2-pixel long dash every 2 pixels

Type declaration

  • Optional color?: string
  • Optional strokeDasharray?: number[]
  • Optional strokeThickness?: number

TLinearColorMap

TLinearColorMap: { GradientStops: TGradientStop[]; Maximum: number; Minimum: number; Mode: EColorMapMode }

Type declaration

TModifierMouseArgsParams

TModifierMouseArgsParams: { button?: number; isMaster?: boolean; modifierGroup?: string; mousePoint?: Point; mouseWheelDelta?: number; pointerId?: number; pointerType?: string; target?: Element }

Type declaration

  • Optional button?: number
  • Optional isMaster?: boolean
  • Optional modifierGroup?: string
  • Optional mousePoint?: Point
  • Optional mouseWheelDelta?: number
  • Optional pointerId?: number
  • Optional pointerType?: string
  • Optional target?: Element

TPalettingState

TPalettingState: { gradientPaletting: boolean; originalBrushColor?: number; originalPenColor?: number; originalPenGradient?: boolean; paletteTexture?: ISCRTPalette; palettedColors: UIntVector; palettedColorsHashCode: number }

Type declaration

  • gradientPaletting: boolean
  • Optional originalBrushColor?: number
  • Optional originalPenColor?: number
  • Optional originalPenGradient?: boolean
  • Optional paletteTexture?: ISCRTPalette
  • palettedColors: UIntVector
  • palettedColorsHashCode: number

TPointMarkerArgb

TPointMarkerArgb: { fill: number; stroke: number }

Type declaration

  • fill: number
  • stroke: number

TPriceBar

TPriceBar: {}

Type declaration

TRenderLayers

TRenderLayers: { first: TDrawFunction[]; fourth: TDrawFunction[]; second: TDrawFunction[]; third: TDrawFunction[] }

Defines Render Layers 1,2,3,4 which are used to compose rendering

Type declaration

TSciChartConfig

TSciChartConfig: { dataUrl?: string; wasmUrl?: string }

Type declaration

  • Optional dataUrl?: string
  • Optional wasmUrl?: string

TSciChartDestination

TSciChartDestination: { canvasElementId: string; height: number; sciChartSurface: SciChartSurfaceBase; width: number }

Type declaration

TSciChartSurfaceCanvases

TSciChartSurfaceCanvases: { aspect?: number; domCanvas2D?: HTMLCanvasElement; domCanvasWebGL?: HTMLCanvasElement; domChartRoot?: HTMLDivElement; domDivContainer?: HTMLDivElement; domSvgAdornerLayer?: SVGSVGElement; domSvgContainer?: SVGSVGElement }

Type declaration

  • Optional aspect?: number
  • Optional domCanvas2D?: HTMLCanvasElement
  • Optional domCanvasWebGL?: HTMLCanvasElement
  • Optional domChartRoot?: HTMLDivElement
  • Optional domDivContainer?: HTMLDivElement
  • Optional domSvgAdornerLayer?: SVGSVGElement
  • Optional domSvgContainer?: SVGSVGElement

TTextStyle

TTextStyle: { color?: string; fontFamily?: string; fontSize?: number; fontStyle?: string; fontWeight?: string; padding?: Thickness }

A type class to contain information about Axis Label text styles

remarks
  • Set the fontFamily as a string to set the font
  • Set the fontSize as you would in HTML/CSS
  • Set the fontWeight and fontStyle as you would in HTML/CSS
  • Set the color as an HTML Color code to define the color

Type declaration

  • Optional color?: string
  • Optional fontFamily?: string
  • Optional fontSize?: number
  • Optional fontStyle?: string
  • Optional fontWeight?: string
  • Optional padding?: Thickness

TTickLineStyle

TTickLineStyle: { color?: string; strokeThickness?: number; tickSize?: number }

A type class to contain information about Tick line styles

remarks

A tick line is the small 3 pixel line outside the axis.

  • Set the tickSize to define the size of this tick in pixels.
  • Set the color as an HTML Color code to define the color
  • Set the strokeThickness to change the thickness of the tick line

Type declaration

  • Optional color?: string
  • Optional strokeThickness?: number
  • Optional tickSize?: number

TTickObject

TTickObject: { majorTickCoords: number[]; majorTickLabels: string[]; majorTicks: number[]; minorTickCoords: number[]; minorTicks: number[] }

A type which contains info about major, minor tick coordinates, labels and values. Used when drawing the axis gridlines

Type declaration

  • majorTickCoords: number[]

    The major tick coordinates

  • majorTickLabels: string[]

    The major tick label strings

  • majorTicks: number[]

    The major tick numeric values

  • minorTickCoords: number[]

    The minor tick coordinates

  • minorTicks: number[]

    The minor tick numeric values

TTooltipSvgTemplate

TTooltipSvgTemplate: (seriesInfos: SeriesInfo[], svgAnnotation: CursorTooltipSvgAnnotation) => string

Type declaration

TWebAssemblyChart

TWebAssemblyChart: { sciChartSurface: SciChartSurface; wasmContext: TSciChart }

Type declaration

TWebAssemblyChart3D

TWebAssemblyChart3D: { sciChart3DSurface: SciChart3DSurface; wasmContext: TSciChart3D }

Type declaration

Variables

Const locateFile

locateFile: (Anonymous function) = getLocateFile(sciChartConfig3D)

Const sciChartConfig

sciChartConfig: TSciChartConfig

Const sciChartConfig3D

sciChartConfig3D: TSciChartConfig

Functions

animateAny

  • animateAny<T>(durationMs: number, from: T, to: T, onAnimate: (intermediateValue: T) => void, interpolate: (start: T, end: T, interpolationFactor: number) => T, onCompleted: () => void, easingFunc: TEasing): AnimationToken
  • description

    A generic function for animating any value

    remarks

    See functions DoubleAnimator.animate and NumberRangeAnimator.animate for examples on how to use this

    Type parameters

    • T

    Parameters

    • durationMs: number

      The duration of the animation in milliseconds

    • from: T

      The start value

    • to: T

      The end value

    • onAnimate: (intermediateValue: T) => void

      A function which is called on animation step, with the current intermediate value passed in

        • (intermediateValue: T): void
        • Parameters

          • intermediateValue: T

          Returns void

    • interpolate: (start: T, end: T, interpolationFactor: number) => T

      An interpolation function

        • (start: T, end: T, interpolationFactor: number): T
        • Parameters

          • start: T
          • end: T
          • interpolationFactor: number

          Returns T

    • onCompleted: () => void

      A function which is called when animation is completed

        • (): void
        • Returns void

    • easingFunc: TEasing

      An easing function. See IEasingMap for a list of values

    Returns AnimationToken

Const calcAverageForArray

  • calcAverageForArray(ar: number[], averageNum: number, index?: number): number
  • Parameters

    • ar: number[]
    • averageNum: number
    • Optional index: number

    Returns number

Const calcAverageForDoubleVector

  • calcAverageForDoubleVector(doubleVector: DoubleVector, averageNum: number, index?: number): number
  • description

    Calculates average for DoubleVector

    Parameters

    • doubleVector: DoubleVector
    • averageNum: number

      number of values to respect for the average

    • Optional index: number

      index of the latest value to include, by default equals to length-1 of DoubleVector

    Returns number

Const calcCrossProduct

  • calcCrossProduct(xA: number, yA: number, xB: number, yB: number, xC: number, yC: number): number
  • Parameters

    • xA: number
    • yA: number
    • xB: number
    • yB: number
    • xC: number
    • yC: number

    Returns number

Const calcDistance

  • calcDistance(x1: number, y1: number, x2: number, y2: number): number
  • Parameters

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

    Returns number

Const calcDistanceFromLine

  • calcDistanceFromLine(x: number, y: number, startX: number, startY: number, endX: number, endY: number): number
  • Parameters

    • x: number
    • y: number
    • startX: number
    • startY: number
    • endX: number
    • endY: number

    Returns number

Const calcDistanceFromLineSegment

  • calcDistanceFromLineSegment(x: number, y: number, startX: number, startY: number, endX: number, endY: number): number
  • Parameters

    • x: number
    • y: number
    • startX: number
    • startY: number
    • endX: number
    • endY: number

    Returns number

Const calcDotProduct

  • calcDotProduct(v1x: number, v1y: number, v2x: number, v2y: number, v3x: number, v3y: number): number
  • Parameters

    • v1x: number
    • v1y: number
    • v2x: number
    • v2y: number
    • v3x: number
    • v3y: number

    Returns number

Const calcLegendPosition

  • calcLegendPosition(seriesViewRect: Rect, div: Rect, margin: number, placement: ELegendPlacement): { left: number; top: number }
  • Parameters

    Returns { left: number; top: number }

    • left: number
    • top: number

Const calcNewApex

  • calcNewApex(x1: number, y1: number, x2: number, y2: number): { point1: { x: number; y: number }; point2: { x: number; y: number }; point3: { x: number; y: number }; point4: { x: number; y: number } }
  • calcNewApex(x1: number, y1: number, x2: number, y2: number): { point1: { x: number; y: number }; point2: { x: number; y: number }; point3: { x: number; y: number }; point4: { x: number; y: number } }
  • Parameters

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

    Returns { point1: { x: number; y: number }; point2: { x: number; y: number }; point3: { x: number; y: number }; point4: { x: number; y: number } }

    • point1: { x: number; y: number }
      • x: number
      • y: number
    • point2: { x: number; y: number }
      • x: number
      • y: number
    • point3: { x: number; y: number }
      • x: number
      • y: number
    • point4: { x: number; y: number }
      • x: number
      • y: number
  • Parameters

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

    Returns { point1: { x: number; y: number }; point2: { x: number; y: number }; point3: { x: number; y: number }; point4: { x: number; y: number } }

    • point1: { x: number; y: number }
      • x: number
      • y: number
    • point2: { x: number; y: number }
      • x: number
      • y: number
    • point3: { x: number; y: number }
      • x: number
      • y: number
    • point4: { x: number; y: number }
      • x: number
      • y: number

Const calculateAnimationValues

  • calculateAnimationValues(wasmContext: TSciChart, yValues: DoubleVector, yAnimationValues: DoubleVector, animation: BaseAnimation, progress: number, zeroZeroLine?: boolean): void
  • Runs on start up animation to update animation vectors

    Parameters

    • wasmContext: TSciChart
    • yValues: DoubleVector

      initial values

    • yAnimationValues: DoubleVector

      calculated values used for the animation

    • animation: BaseAnimation

      The animation type, child class for BaseAnimation

    • progress: number

      Current animation progress

    • Default value zeroZeroLine: boolean = false

      Sets zeroLine = 0, is used for XyzDataSeries

    Returns void

Const calculateMaxGroupSize

  • calculateMaxGroupSize(outerLayoutSizes: Record<string, number>): number
  • Parameters

    • outerLayoutSizes: Record<string, number>

    Returns number

Const convertColor

  • convertColor(htmlColor: string, opacity?: number): string
  • Parameters

    • htmlColor: string
    • Default value opacity: number = 1

    Returns string

    rgbColor, for example "0xff00ff00" - green

Const convertRgbToHexColor

  • convertRgbToHexColor(r: number, g: number, b: number): string
  • Converts individual R,G, and B components to HEX Color

    Parameters

    • r: number
    • g: number
    • b: number

    Returns string

    argbColor, for example "0xff00ff00" - green

Const convertToPixel

  • convertToPixel(red: number, green: number, blue: number, opacity: number): number
  • Parameters

    • red: number

      number value from 0 to 255

    • green: number

      number value from 0 to 255

    • blue: number

      number value from 0 to 255

    • opacity: number

      number value from 0 to 255

    Returns number

    pixel in hex format: opacity, red, green, blue. For example: "0xff0000ff" - blue pixel with no opacity

Const copyToCanvas

  • copyToCanvas(masterCanasId: string): (Anonymous function)
  • Parameters

    • masterCanasId: string

    Returns (Anonymous function)

countUnique

  • countUnique(iterable: string[]): number
  • Parameters

    • iterable: string[]

    Returns number

Const createChartDestination

  • createChartDestination(canvasId: string): { canvas: HTMLCanvasElement; GetHeight: any; GetID: any; GetWidth: any }
  • Parameters

    • canvasId: string

    Returns { canvas: HTMLCanvasElement; GetHeight: any; GetID: any; GetWidth: any }

    • canvas: HTMLCanvasElement
    • GetHeight: function
      • GetHeight(): any
      • Returns any

    • GetID: function
      • GetID(): any
      • Returns any

    • GetWidth: function
      • GetWidth(): any
      • Returns any

createImageAsync

  • createImageAsync(src: string): Promise<HTMLImageElement>
  • Helper function to create an HTML Image {@link HTMLImageElement} asychronously by passing in the string image source

    remarks

    Returns a promise, await this to get the image element

    Parameters

    • src: string

    Returns Promise<HTMLImageElement>

Const createNativeRect

  • createNativeRect(webAssemblyContext: TSciChart, xTopLeft: number, yTopLeft: number, xBottomRight: number, yBottomRight: number): SCRTRectVertex
  • Helper function to create a {@link SCRTRectVertex} native rectangle vertex

    Parameters

    • webAssemblyContext: TSciChart

      The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and access to our WebGL2 Engine and WebAssembly numerical methods

    • xTopLeft: number
    • yTopLeft: number
    • xBottomRight: number
    • yBottomRight: number

    Returns SCRTRectVertex

Const createNewHitTestInfo

  • createNewHitTestInfo(xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, isVerticalChart: boolean, renderableSeriesType: string, dataSeriesType: EDataSeriesType, xNativeValues: DoubleVector, yNativeValues: DoubleVector, xHitCoord: number, yHitCoord: number, nearestPointIndex: number, hitTestRadius: number, interpolate: boolean): HitTestInfo
  • Parameters

    • xCoordinateCalculator: CoordinateCalculatorBase
    • yCoordinateCalculator: CoordinateCalculatorBase
    • isVerticalChart: boolean
    • renderableSeriesType: string
    • dataSeriesType: EDataSeriesType
    • xNativeValues: DoubleVector
    • yNativeValues: DoubleVector
    • xHitCoord: number
    • yHitCoord: number
    • nearestPointIndex: number
    • hitTestRadius: number
    • interpolate: boolean

    Returns HitTestInfo

Const createPen

  • createPen(wasmContext: TSciChart, htmlColorCode: string, strokeThickness: number, opacity: number, strokeDashArray?: number[]): SCRTPen
  • Helper function to create a {@link SCRTPen} native pen access to our WebGL2 Engine and WebAssembly numerical methods

    Parameters

    • wasmContext: TSciChart

      The {@link TSciChart | SciChart WebAssembly Context} containing native methods and access to our WebGL2 WebAssembly Drawing Engine

    • htmlColorCode: string

      Html color code in the format "#fff", "#ff0000", "rgba(255,255,0,1)", "#11333333"

    • strokeThickness: number

      the stroke thickness of the pen in pixels

    • opacity: number

      The opacity factor

    • Optional strokeDashArray: number[]

      the StrokeDashArray which defines any dash e.g. [2,2] means dash for 2pts, gap for 2pts (or undefined = solid line).

    Returns SCRTPen

Const createSolidBrush

  • createSolidBrush(wasmContext: TSciChart, htmlColorCode: string, opacity: number): SCRTBrush
  • Helper function to create a {@link SCRTBrush} native solid color brushes

    Parameters

    • wasmContext: TSciChart
    • htmlColorCode: string

      Html color code in the format "#fff", "#ff0000", "rgba(255,255,0,1)", "#11333333"

    • opacity: number

    Returns SCRTBrush

deleteSafe

Const deviderForCoordinate

  • deviderForCoordinate(devider: number, isAxisFlipped: boolean, isFlippedCoordinates: boolean, xCoord: number, labelTextWidth: number, xCoordNext: number, xCenterDelta: number): number
  • Parameters

    • devider: number
    • isAxisFlipped: boolean
    • isFlippedCoordinates: boolean
    • xCoord: number
    • labelTextWidth: number
    • xCoordNext: number
    • xCenterDelta: number

    Returns number

Const deviderForLastCoordinate

  • deviderForLastCoordinate(devider: number, isFlippedCoordinates: boolean, lastCoord: number, lastLabelTextWidth: number, preLastCoord: number, preLastXCenterDelta: number): number
  • Parameters

    • devider: number
    • isFlippedCoordinates: boolean
    • lastCoord: number
    • lastLabelTextWidth: number
    • preLastCoord: number
    • preLastXCenterDelta: number

    Returns number

Const drawAxisMarkerAnnotation

  • drawAxisMarkerAnnotation(currentAxis: AxisBase2D, renderContext: WebGlRenderContext2D, displayValue: string, markerCoordinate: number, x1Coord: number, y1Coord: number, textStyle: TTextStyle, fill: string): void
  • Parameters

    Returns void

Const drawBorder

  • drawBorder(renderContext: WebGlRenderContext2D, webAssemblyContext2D: TSciChart, solidBrushCacheBorder: SolidBrushCache, borderRect: Rect, leftBorder: number, topBorder: number, rightBorder: number, bottomBorder: number, color: string): void
  • Parameters

    • renderContext: WebGlRenderContext2D
    • webAssemblyContext2D: TSciChart
    • solidBrushCacheBorder: SolidBrushCache
    • borderRect: Rect
    • leftBorder: number
    • topBorder: number
    • rightBorder: number
    • bottomBorder: number
    • color: string

    Returns void

Const drawLineAnnotation

  • Function to draw Vertical or Horizontal Line annotations with labels

    Parameters

    Returns void

Const drawModifiersAxisLabel

  • Parameters

    Returns void

Const fillNoisySinewave

  • fillNoisySinewave(pointCount: number, xMax: number, frequency: number, amplitude: number, noiseAmplitude: number, dataSeries: XyDataSeries): void
  • Parameters

    • pointCount: number
    • xMax: number
    • frequency: number
    • amplitude: number
    • noiseAmplitude: number
    • dataSeries: XyDataSeries

    Returns void

Const formatNumber

  • formatNumber(dataValue: number, numericFormat: ENumericFormat): string
  • Parameters

    Returns string

Const formatNumber2Digits

  • formatNumber2Digits(value: number): string
  • description

    Formats value always to have 2 decimal digits, e.g. 12.45, 14.20, 17.00

    Parameters

    • value: number

    Returns string

Const formatUnixDateToHumanString

  • formatUnixDateToHumanString(unixTimestamp: number): string
  • Result 11/23/2018

    Parameters

    • unixTimestamp: number

    Returns string

Const formatUnixDateToHumanStringDDMM

  • formatUnixDateToHumanStringDDMM(unixTimestamp: number): string
  • Parameters

    • unixTimestamp: number

    Returns string

Const formatUnixDateToHumanStringHHMM

  • formatUnixDateToHumanStringHHMM(unixTimestamp: number): string
  • Parameters

    • unixTimestamp: number

    Returns string

Const generateGuid

  • generateGuid(): string
  • description

    Generates GUID/UUID RFC4122 version 4 compliant

    Returns string

Const getActiveAxes

  • Parameters

    Returns AxisBase2D[]

Const getDataPointWidth

  • getDataPointWidth(xValues: DoubleVector, xCoordCalc: CoordinateCalculatorBase, seriesViewRectWidth: number, widthFraction: number, isCategoryAxis: boolean): number
  • Parameters

    • xValues: DoubleVector
    • xCoordCalc: CoordinateCalculatorBase
    • seriesViewRectWidth: number
    • widthFraction: number
    • isCategoryAxis: boolean

    Returns number

Const getHitTestInfo

  • getHitTestInfo(xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, isVerticalChart: boolean, renderableSeriesType: string, dataSeriesType: EDataSeriesType, xNativeValues: DoubleVector, yNativeValues: DoubleVector, xHitCoord: number, yHitCoord: number, nearestPointIndex: number, hitTestRadius: number, interpolate: boolean): HitTestInfo
  • Parameters

    • xCoordinateCalculator: CoordinateCalculatorBase
    • yCoordinateCalculator: CoordinateCalculatorBase
    • isVerticalChart: boolean
    • renderableSeriesType: string
    • dataSeriesType: EDataSeriesType
    • xNativeValues: DoubleVector
    • yNativeValues: DoubleVector
    • xHitCoord: number
    • yHitCoord: number
    • nearestPointIndex: number
    • hitTestRadius: number
    • interpolate: boolean

    Returns HitTestInfo

Const getIsHorizontal

  • Parameters

    Returns boolean

Const getIsVertical

  • Parameters

    Returns boolean

Const getLabelCoordinates

  • getLabelCoordinates(currentAxis: AxisBase2D, labelPlacement: ELabelPlacement, x1Coord: number, x2Coord: number, y1Coord: number, y2Coord: number, textureHeight: number, textureWidth: number): { xPosition: number; yPosition: number }
  • Calculates coordinates of the annotation label. The coordinates are defined as an absolute position on the SciChartSurface.

    Parameters

    • currentAxis: AxisBase2D
    • labelPlacement: ELabelPlacement
    • x1Coord: number
    • x2Coord: number
    • y1Coord: number
    • y2Coord: number
    • textureHeight: number
    • textureWidth: number

    Returns { xPosition: number; yPosition: number }

    • xPosition: number
    • yPosition: number

Const getLabelValue

  • getLabelValue(currentAxis: AxisBase2D, labelCoord: number): string
  • Parameters

    Returns string

Const getLineCoordinates

  • getLineCoordinates(x1Coord: number, y1Coord: number, x2Coord: number, y2Coord: number, labelHeight: number, labelWidth: number, labelPlacement: ELabelPlacement, currentAxis: AxisBase2D): { x1LineCoord: number; x2LineCoord: number; y1LineCoord: number; y2LineCoord: number }
  • Calculates annotation line coordinates accordingly to axis alignment and label placement. Returns coordinates relative to seriesViewRect.

    Parameters

    • x1Coord: number
    • y1Coord: number
    • x2Coord: number
    • y2Coord: number
    • labelHeight: number
    • labelWidth: number
    • labelPlacement: ELabelPlacement
    • currentAxis: AxisBase2D

    Returns { x1LineCoord: number; x2LineCoord: number; y1LineCoord: number; y2LineCoord: number }

    • x1LineCoord: number
    • x2LineCoord: number
    • y1LineCoord: number
    • y2LineCoord: number

Const getMasterCanvas

  • getMasterCanvas(canvasElementId: string): HTMLCanvasElement
  • Parameters

    • canvasElementId: string

    Returns HTMLCanvasElement

Const getNextRandomPriceBarFactory

  • getNextRandomPriceBarFactory(startDateTimestamp: number, candleIntervalMinutes: number, simulateDateGap: boolean, startPrice: number): (Anonymous function)
  • Parameters

    • startDateTimestamp: number
    • candleIntervalMinutes: number
    • simulateDateGap: boolean
    • startPrice: number

    Returns (Anonymous function)

Const getNoisySinewave

  • getNoisySinewave(pointCount: number, xMax: number, frequency: number, amplitude: number, noiseAmplitude: number): number[][]
  • Parameters

    • pointCount: number
    • xMax: number
    • frequency: number
    • amplitude: number
    • noiseAmplitude: number

    Returns number[][]

Const getRandomInRange

  • getRandomInRange(min: number, max: number, decimalPlaces: number): number
  • Return random number in range [min, max]

    Parameters

    • min: number
    • max: number
    • decimalPlaces: number

    Returns number

Const getSeriesInfo

Const getStocksDataFactory

  • getStocksDataFactory(STEP: number, RANDOM_MIN: number, RANDOM_MAX: number): (Anonymous function)
  • Creates function to generate stock data

    Parameters

    • STEP: number
    • RANDOM_MIN: number
    • RANDOM_MAX: number

    Returns (Anonymous function)

getUniqueValues

  • getUniqueValues(array: string[]): string[]
  • Parameters

    • array: string[]

    Returns string[]

Const getWindowedYRange

  • getWindowedYRange(webAssemblyContext: TSciChart, xValues: DoubleVector, yValues: DoubleVector, xRange: NumberRange, getPositiveRange: boolean, isXCategoryAxis: boolean, isSorted: boolean): NumberRange
  • Parameters

    • webAssemblyContext: TSciChart
    • xValues: DoubleVector
    • yValues: DoubleVector
    • xRange: NumberRange
    • getPositiveRange: boolean
    • isXCategoryAxis: boolean
    • isSorted: boolean

    Returns NumberRange

Const getXRange

  • Parameters

    • range: NumberRange
    • count: number
    • widthFraction: number

    Returns NumberRange

Const hasAllProperties

  • hasAllProperties(obj: any, props: string[]): boolean
  • Parameters

    • obj: any
    • props: string[]

    Returns boolean

isRealNumber

  • isRealNumber(number: number): boolean
  • returns true if the number is a real number (not NAN, not Infinite)

    Parameters

    • number: number

    Returns boolean

linearColorMapLerp

  • Linearly interpolates a data-value in a TLinearColorMap, which specifies Gradient Stops, Data Minimum and Maximum and color stepping mode

    Parameters

    Returns number

Const measureTextHeight

  • measureTextHeight(fontSizePx: number): number
  • Parameters

    • fontSizePx: number

    Returns number

Const measureTextWidth

  • measureTextWidth(ctx: CanvasRenderingContext2D, text: string): number
  • Parameters

    • ctx: CanvasRenderingContext2D
    • text: string

    Returns number

Const numericHashCode

  • numericHashCode(hash: number, value: number): number
  • Parameters

    • hash: number
    • value: number

    Returns number

Const parseArgbToHtmlColor

  • parseArgbToHtmlColor(argbColor: number): string
  • Converts color from ARGB number format into HTML string format #FFFFFFFF

    Parameters

    • argbColor: number

      color in ARGB format

    Returns string

parseColorToHexStringAbgr

  • parseColorToHexStringAbgr(input: string, opacityOverride?: number): string
  • Parse colors and convert them to hex string in ABGR format to use in c++ Examples: "#fff", "#ff0000", "rgba(255,255,0,1)", "#11333333"

    Parameters

    • input: string
    • Optional opacityOverride: number

    Returns string

parseColorToHexStringArgb

  • parseColorToHexStringArgb(input: string, opacityOverride?: number): string
  • Parse colors and convert them to hex string to use in c++ Examples: "#fff", "#ff0000", "rgba(255,255,0,1)", "#11333333"

    Parameters

    • input: string
    • Optional opacityOverride: number

    Returns string

parseColorToTArgb

  • parseColorToTArgb(input: string): TArgb
  • Parameters

    • input: string

    Returns TArgb

parseColorToUIntArgb

  • parseColorToUIntArgb(input: string, opacity?: number): number
  • Parameters

    • input: string
    • Optional opacity: number

    Returns number

Const scaleAxes

  • scaleAxes(axes: AxisBase2D[], initialVisibleRanges: NumberRange[], delta: number, isMoreThanHalf: boolean): void
  • Parameters

    Returns void

Const testIsInBounds

  • testIsInBounds(x: number, y: number, left: number, top: number, right: number, bottom: number): boolean
  • Parameters

    • x: number
    • y: number
    • left: number
    • top: number
    • right: number
    • bottom: number

    Returns boolean

Const testIsInXBounds

  • testIsInXBounds(xHitTestPoint: number, xDataPointCoord: number, maxDistance: number): boolean
  • Parameters

    • xHitTestPoint: number
    • xDataPointCoord: number
    • maxDistance: number

    Returns boolean

Const testIsOverAxes

  • Parameters

    Returns boolean

Const toHex

  • toHex(value: number): string
  • toHex(value: number): string
  • Parameters

    • value: number

    Returns string

  • Parameters

    • value: number

    Returns string

Const toTsrVector4

  • toTsrVector4(color: TArgb, tsrColor: TSRVector4): TSRVector4
  • Converts a color in TArgb format to TSRVector4 (RGBA -> x,y,z,w) for use in 3D Engine

    Parameters

    • color: TArgb
    • tsrColor: TSRVector4

    Returns TSRVector4

Const translateFromCanvasToSeriesViewRect

  • translateFromCanvasToSeriesViewRect(point: Point, seriesViewRect: Rect): Point
  • Parameters

    Returns Point

Const translateFromCanvasToSeriesViewRectX

  • translateFromCanvasToSeriesViewRectX(x: number, seriesViewRect: Rect): number
  • Parameters

    • x: number
    • seriesViewRect: Rect

    Returns number

Const translateFromCanvasToSeriesViewRectY

  • translateFromCanvasToSeriesViewRectY(y: number, seriesViewRect: Rect): number
  • Parameters

    • y: number
    • seriesViewRect: Rect

    Returns number

Const translateFromSeriesViewRectToCanvas

  • translateFromSeriesViewRectToCanvas(point: Point, seriesViewRect: Rect): Point
  • Parameters

    Returns Point

uintArgbColorIsTransparent

  • uintArgbColorIsTransparent(argbColor: number): boolean
  • Parameters

    • argbColor: number

    Returns boolean

uintArgbColorLerp

  • uintArgbColorLerp(from: number, to: number, ratio: number): number
  • Linearly interpolates between two colors based on the ratio passed in. E.g. Ratio = 0.0f returns From color, ratio = 1.0f returns To Color. Ratio = 0.5f returns a mix of the two

    Parameters

    • from: number
    • to: number
    • ratio: number

    Returns number

uintArgbColorMultiplyOpacity

  • uintArgbColorMultiplyOpacity(argbColor: number, opacity: number): number
  • Parameters

    • argbColor: number
    • opacity: number

    Returns number

uintArgbColorToAbgr

  • uintArgbColorToAbgr(argbColor: number): number
  • Parameters

    • argbColor: number

    Returns number

Const zeroArray2D

  • zeroArray2D(dimensions: number[]): number[][]
  • Parameters

    • dimensions: number[]

    Returns number[][]

Object literals

Const defaultThemeColors

defaultThemeColors: object

annotationsGripsBackroundBrush

annotationsGripsBackroundBrush: string = "#FFFFFF33"

annotationsGripsBorderBrush

annotationsGripsBorderBrush: string = "#EEEEEEFF"

axis3DBandsFill

axis3DBandsFill: string = "#202123E1"

axisBandsFill

axisBandsFill: string = "#202123E1"

axisBorder

axisBorder: string = "#00000000"

axisPlaneBackgroundFill

axisPlaneBackgroundFill: string = "TRANSPARENT"

axisTitleColor

axisTitleColor: string = "#C8C7C3FF"

columnFillBrush

columnFillBrush: string = "#FFFFFFFF"

columnLineColor

columnLineColor: string = "#FFFFFFFF"

cursorLineBrush

cursorLineBrush: string = "#228B22FF"

downBandSeriesFillColor

downBandSeriesFillColor: string = "#FF191933"

downBandSeriesLineColor

downBandSeriesLineColor: string = "#FF1919FF"

downBodyBrush

downBodyBrush: string = "#ff5050B2"

downWickColor

downWickColor: string = "#ff5050FF"

gridBackgroundBrush

gridBackgroundBrush: string = "TRANSPARENT"

gridBorderBrush

gridBorderBrush: string = "#5A5B5BFF"

labelBackgroundBrush

labelBackgroundBrush: string = "#42b649AA"

labelBorderBrush

labelBorderBrush: string = "#42b649FF"

labelForegroundBrush

labelForegroundBrush: string = "#EEEEEEFF"

legendBackgroundBrush

legendBackgroundBrush: string = "#1D2C35FF"

lineSeriesColor

lineSeriesColor: string = "#C6E6FFFF"

majorGridLineBrush

majorGridLineBrush: string = "#323539FF"

minorGridLineBrush

minorGridLineBrush: string = "#232426FF"

mountainAreaBrush

mountainAreaBrush: string = "#4083B777"

mountainLineColor

mountainLineColor: string = "#C6E6FFFF"

overviewFillBrush

overviewFillBrush: string = "#262728BB"

planeBorderColor

planeBorderColor: string = "#333333FF"

rolloverLineBrush

rolloverLineBrush: string = "#42b64933"

rubberBandFillBrush

rubberBandFillBrush: string = "#42b64933"

rubberBandStrokeBrush

rubberBandStrokeBrush: string = "#42b64977"

sciChartBackground

sciChartBackground: string = "#1C1C1EFF"

scrollbarBackgroundBrush

scrollbarBackgroundBrush: string = "#262728FF"

scrollbarBorderBrush

scrollbarBorderBrush: string = "#121212FF"

scrollbarGripsBackgroundBrush

scrollbarGripsBackgroundBrush: string = "#535353FF"

scrollbarViewportBackgroundBrush

scrollbarViewportBackgroundBrush: string = "#222222FF"

scrollbarViewportBorderBrush

scrollbarViewportBorderBrush: string = "#232323FF"

shadowEffectColor

shadowEffectColor: string = "#000000FF"

textAnnotationBackground

textAnnotationBackground: string = "#42b649AA"

textAnnotationForeground

textAnnotationForeground: string = "#EEEEEEFF"

tickTextBrush

tickTextBrush: string = "#A6A7ACFF"

upBandSeriesFillColor

upBandSeriesFillColor: string = "#279B2733"

upBandSeriesLineColor

upBandSeriesLineColor: string = "#279B27FF"

upBodyBrush

upBodyBrush: string = "#50ff50B2"

upWickColor

upWickColor: string = "#50ff50FF"

defaultColorMapBrush

defaultColorMapBrush: object

point_0

point_0: string = "DARKBLUE"

point_0_5

point_0_5: string = "CORNFLOWERBLUE"

point_1

point_1: string = "#FF22AAFF"

Const easing

easing: object

Easing functions used throughout SciChart when animations are used

cubic

  • cubic(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

elastic

  • elastic(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inCirc

  • inCirc(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inCubic

  • inCubic(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inExpo

  • inExpo(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutCirc

  • inOutCirc(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutCubic

  • inOutCubic(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutExpo

  • inOutExpo(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutQuad

  • inOutQuad(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutQuart

  • inOutQuart(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutQuint

  • inOutQuint(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inOutSine

  • inOutSine(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inQuad

  • inQuad(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inQuart

  • inQuart(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inQuint

  • inQuint(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

inSine

  • inSine(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

linear

  • linear(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outCirc

  • outCirc(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outCubic

  • outCubic(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outExpo

  • outExpo(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outQuad

  • outQuad(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outQuart

  • outQuart(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outQuint

  • outQuint(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

outSine

  • outSine(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

quadratic

  • quadratic(t: number): number
  • inheritdoc

    Parameters

    • t: number

    Returns number

Generated using TypeDoc