Options
All
  • Public
  • Public/Protected
  • All
Menu

LightningChart® JS API Documentation

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AbruptMouseEventHandler

AbruptMouseEventHandler: function

Event handler for mouse event that is 'abrupt'. Meaning that the event can be triggered as a side-effect of something totally unrelated, without an actual mouse-event. ( Designed for making sure that mouse-leave is handled when hovered entity is disposed )

param

Object

param

Browser MouseEvent that triggered the event of undefined if event is abrupt

    • Parameters

      • obj: T
      • Optional event: MouseEvent

      Returns void

AngleInterval

AngleInterval: SliceInterval

Angular interval object defines the minimum and maximum interval in degrees.

AnimationEasing

AnimationEasing: function

Interface for AnimationEasing.

See AnimationEasings for a collection of default options.

param

Starting value of the animation

param

End value of the animation

param

Animation Duration in milliseconds

    • Parameters

      • start: number
      • end: number
      • duration: number

      Returns Ease

AnimationFactory

AnimationFactory: function

Type of Animation Factory

param

Array of start and end animation values

param

Function for handling of interframe modification

param

Override default duration of animation

AnimationFrameCallback

AnimationFrameCallback: function

Function for handling of interframe modification

param

Values calculated by Ease function

    • Parameters

      • values: Array<number>

      Returns void

AreaSeriesTypes

Available Area Series types

BoxSeriesFormatter

BoxSeriesFormatter: function

Type of a BoxSeriesFormatter function. Defines what Cursor ResultTables show.

param

Builder that is used to build contents of ResultTable

param

BoxSeries

param

StatisticData that is to be displayed with ResultTable

returns

TableContentBuilder that was supplied

CursorStyler

CursorStyler: Mutator<T>

Mutator function that is used for modifying a Cursor during runtime.

CustomTickTextFormatter

CustomTickTextFormatter: function

Interface for function which specifies CustomTick text.

    • Parameters

      • value: number
      • customTick: CustomTick<TickMarkerBackgroundType>

      Returns string

DashboardResizeEventInterface

DashboardResizeEventInterface: AbstractEventInterface

Type of Dashboard resize-event interface. This interface is injected into Panels created by Dashboard. The Panel should use it to subscribe to Dashboard-resize events.

DynamicUIMouseStyle

DynamicUIMouseStyle: function

Type definition for a dynamic mouse style setting. This allows for mouse styles that depend on situation.

param

UIElement to apply

returns

Mouse style as string or undefined

    • Parameters

      • uiElement: T

      Returns string | undefined

EngineDimension

EngineDimension: [number | undefined, number | undefined] | undefined | number

Type of dimension for engine; can be a tuple of boundaries, a single static dimension or undefined for container size. When using a tuple to specify boundaries [min, max], actual size for engine will be the size of its container clamped to the specified pixel boundaries. Any of the values inside the tuple can be undefined. Using a single number will set a static size for engine dimension, meaning no resizing of engine will take effect.

EngineOptions

Interface that can be used to configure rendering Engine of Charts and other LCJS components.

Example usage:

Desired result Value
Automatically generated DIV on document undefined
Embed Engine in a DOM element { containerId: 'dashboard_div_id' }

FigureSeriesFormatter

FigureSeriesFormatter: function

Interface for a function which builds ResultTable content when pointing at a FigureSeries.

param

Builder that is used to build contents of ResultTable. Use addRow() method for adding content.

param

Series

param

Figure that is pointed at. This type is abstract and depends on the type of Series in question. For example, if you are using a BoxSeries this 'figure' will be of type: "BoxFigure".

returns

TableContentBuilder that was supplied

    • Type parameters

      Parameters

      • tableContentBuilder: T
      • series: P
      • figure: FigureType

      Returns T

FigureStyler

FigureStyler: function

Type for styler function for Figure

param

Figure

    • Parameters

      • figure: T

      Returns void

FontStyle

FontStyle: "normal" | "italic" | "oblique"

The font-style attribute specifies whether the text is to be rendered using a normal, italic or oblique face.

FontWeight

FontWeight: "normal" | "bold" | "bolder" | "lighter" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

The font-weight property specifies the weight (or boldness) of the font. The font weights available to you will depend on the font-family you are using. Some fonts are only available in normal and bold.

GaugeAngleIntervalEventHandler

GaugeAngleIntervalEventHandler: function

Event handler for gauge angle interval changed

param

Object

param

Previous angle interval of the Gauge

param

Current angle interval of the Gauge

GaugeChartTypes

GaugeChartTypes: SolidGauge

Available Gauge Chart types.

ImmutableMutator

ImmutableMutator: function

Type of a mutator function for abstract, immutable object. Function provides functionality for creating a new object based on an existing one.

param

Reference object

returns

New object

    • Parameters

      • object: T

      Returns B

IntensitySeriesTypes

IntensitySeriesTypes: IntensityGridSeries | IntensityMeshSeries

IntervalChangeEventListener

IntervalChangeEventListener: function

Interval change event listener.

param

Slice

param

Previous slice interval

param

Next slice interval

LUTOptions

LUTOptions: LUTStepsOptions & Partial<ValuePaletteOptions>

Interface defines a LUT lookup table configurations.

Matrix

Matrix: Array<Array<T>>

Generic multi-dimensional array of specified type.

MouseDragEventHandler

MouseDragEventHandler: function

Event handler for mouse drag

param

Object

param

Browser MouseEvent that triggered the event

param

Button that is being held down

param

Start location of mouse

param

Dragged delta

    • Parameters

      • obj: T
      • event: MouseEvent
      • button: number
      • startLocation: Point
      • delta: Point

      Returns void

MouseDragStartEventHandler

MouseDragStartEventHandler: function

Event handler for mouse drag start

param

Object

param

Browser MouseEvent that triggered the event

param

Button that is being held down

    • Parameters

      • obj: T
      • event: MouseEvent
      • button: number

      Returns void

MouseDragStopEventHandler

MouseDragStopEventHandler: function

Event handler for mouse drag

param

Object

param

Browser MouseEvent that triggered the event

param

Button that is being held down

param

Start location of mouse

    • Parameters

      • obj: T
      • event: MouseEvent
      • button: number
      • startLocation: Point

      Returns void

MouseEventHandler

MouseEventHandler: function

Event handler for mouse move

param

Object

param

Browser MouseEvent that triggered the event

    • Parameters

      • obj: T
      • event: MouseEvent

      Returns void

MouseWheelEventHandler

MouseWheelEventHandler: function

Event handler for mouse wheel

param

Object

param

Browser WheelEvent that triggered the event

    • Parameters

      • obj: T
      • event: WheelEvent

      Returns void

Mutator

Mutator: function

Type of a mutator function for abstract object. Function provides functionality for modifying an object.

param

Object to mutate

    • Parameters

      • object: T

      Returns void

OHLCFigureStyler

OHLCFigureStyler: function

Type of styler function for OHLC figures

    • Parameters

      • figure: T

      Returns void

OHLCSeriesFormatter

OHLCSeriesFormatter: function

Interface for a function which builds ResultTable content when pointing at an OHLCSeries.

param

Builder that is used to build contents of ResultTable. Use addRow() method for adding content.

param

OHLCSeries

param

OHLCSegment that is pointed. Has methods for reading its Open, High, Low, Close and Position values.

returns

TableContentBuilder that was supplied

OHLCSeriesTypes

OHLCSeriesTypes: OHLCSeriesTraditional<PositiveFigure, NegativeFigure> | OHLCSeriesWithAutomaticPacking<PositiveFigure, NegativeFigure>

Available OHLC Series types

Padding

Padding: Margin

Interface for a data-structure which represents a measurement of four sides. Has number properties for:

  • left
  • top
  • right
  • bottom

This data-structure is mainly used for specifying Chart paddings and UIElement paddings/margins.

Duplicate of Margin.

Palette

Palette: function

Type of an abstract Palette function. NOTE: It is common for applications dealing with Palettes to assume that they are continuous, meaning that when supplied an overflowing index, it will return loop back to start.

param

Index of item to pick from Palette

returns

Generated item

    • Parameters

      • index: number

      Returns T

PaletteFactory

PaletteFactory: function

Type of an abstract Palette factory.

param

Length of Palette

returns

Palette of specified length

    • Parameters

      • length: number

      Returns Palette<T>

RangeSeriesFormatter

RangeSeriesFormatter: function

Interface for a function which builds ResultTable content when pointing at a RangeSeries.

param

Builder that is used to build contents of ResultTable. Use addRow() method for adding content.

param

RangeSeries.

param

Position on the axis.

param

High value on the axis.

param

Low value on the axis.

returns

TableContentBuilder that was supplied

    • Type parameters

      Parameters

      • tableContentBuilder: T
      • series: RangeSeries
      • position: number
      • high: number
      • low: number

      Returns T

ResultTableContent

ResultTableContent: Array<string | undefined>[]

Interface that represents content displayable by a ResultTable.

Currently simply a grid of strings, but in the future this could be extended to contain images or such.

SeriesXYFormatter

SeriesXYFormatter: function

Interface for a function which builds ResultTable content when pointing at a SeriesXY.

param

Builder that is used to build contents of ResultTable. Use addRow() method for adding content.

param

SeriesXY

param

X coordinate

param

Y coordinate

returns

TableContentBuilder that was supplied

    • Type parameters

      Parameters

      • tableContentBuilder: T
      • series: SeriesXY
      • x: number
      • y: number

      Returns T

SliceLabelFormatter

SliceLabelFormatter: function

Type of function which is used to format text of Slice Labels. It is a function which generates a string based on a Slice along with some additional information.

See SliceLabelFormatters-collection for quick access to some example implementations.

Use with SlicedCharts.setLabelFormatter

Example usage:

Desired result Usage
Use a default implementation SlicedCharts.setLabelFormatter(SliceLabelFormatters.NamePlusRelativeValue)
Use a custom implementation SlicedCharts.setLabelFormatter((slice, relativeValue) => slice.getValue() + ' €')
param

Slice

param

Value of the Slice as a % of all Slice values

returns

String text for Label

    • Parameters

      • slice: T
      • relativeValue: number

      Returns string

SliceSorter

SliceSorter: function

Type of function which is used to sort Slices of a Chart with Slices. It is a comparator function used with JavaScript API: Array.sort.

See SliceSorters collection for quick access to some example implementations.

Use with SlicedCharts.setSliceSorter

Example usage:

Desired result Usage
Use a default implementation SlicedCharts.setSliceSorter(SliceSorters.SortByValueDescending)
Use a custom implementation SlicedCharts.setSliceSorter((a, b) => a.getValue() - b.getValue())
param

Slice A

param

Slice B

returns

Number which implies the sorted order between Slices A and B. For more details, refer to Array documentation.

    • Parameters

      • sliceA: T
      • sliceB: T

      Returns number

SpiderAxisLabelStrategy

SpiderAxisLabelStrategy: function

Type of an axis label strategy function. Defines how axis labels are aligned.

param

DataStructure that is used to pass result

param

Index of axis. 0 is always directly up

param

Amount of axes in chart

param

Name of axis

param

Angle of axis in radians

param

Label padding as set in chart

returns

SpiderAxisLabelPosition (modified first parameter of function)

SpiderScaleLabelStrategy

SpiderScaleLabelStrategy: function

Type of a scale label strategy function. Defines how scale labels are aligned.

param

DataStructure that is used to pass result

param

Index of axis. 0 is always directly up

param

Amount of axes in chart

param

Name of axis

param

Angle of axis in radians

param

Index of web. 0 is always the outer-edge of spider

param

Amount of webs in chart

param

Label padding as set in chart

returns

SpiderScaleLabelPosition (modified first parameter of function) or undefined to not display label

SpiderSeriesFormatter

SpiderSeriesFormatter: function

Interface for a function which builds ResultTable content when pointing at a SpiderSeries.

param

Builder that is used to build contents of ResultTable. Use addRow() method for adding content.

param

SpiderSeries

param

Value along axis

param

Name of axis

param

Formating function for values along axis

returns

TableContentBuilder that was supplied

    • Type parameters

      Parameters

      • tableContentBuilder: T
      • series: SpiderSeries
      • value: number
      • axis: string
      • formatValue: function
          • Parameters

            • value: number

            Returns string

      Returns T

TickMarker

TickMarker: StylableText & StylableBackground<BackgroundType> & Pointable

Public interface for TickMarkers of CustomTicks.

TouchEventHandler

TouchEventHandler: function

Event handler for pointer event (touch)

param

Object

param

Browser PointerEvent that triggered the event

    • Parameters

      • obj: T
      • event: ExtendedPointerEvent

      Returns void

UIElementStyler

UIElementStyler: function

Type of function for styling a generic UIElement.

    • Parameters

      • object: T
      • theme: Theme

      Returns unknown

UILegendBox

UILegendBox: UIPartWithBackground<BackgroundType> & LegendBox<TitleType, DefaultEntryType>

LegendBox that is a standalone UIElement.

UIMouseStyle

UIMouseStyle: string | DynamicUIMouseStyle<UIElement>

Type definition for a mouse style setting. This tells how mouse should look when hovering over an UIElement.

For a collection of mouse styles, see MouseStyles.

UpdateColorCallback

UpdateColorCallback: function
    • Parameters

      • Optional row: undefined | number
      • Optional column: undefined | number
      • Optional current: IntensityValue & Partial<ColorValue>

      Returns Color | undefined

UpdateGeometryCallback

UpdateGeometryCallback: function
    • Parameters

      • row: number
      • column: number
      • current: Point

      Returns Point | undefined

UpdateValueCallback

UpdateValueCallback: function
    • Parameters

      • Optional row: undefined | number
      • Optional column: undefined | number
      • Optional current: IntensityValue

      Returns number | undefined

ValueChangeEventListener

ValueChangeEventListener: function

Value change event listener.

param

Slice

param

Previous slice value

param

Next slice value

    • Parameters

      • slice: S
      • previous: number
      • next: number

      Returns void

XOHLC

XOHLC: [number, number, number, number, number]

Ordered tuple that contains values for:

  • X
  • Open
  • High
  • Low
  • Close

ZoomBandChartSeriesStyler

ZoomBandChartSeriesStyler: function

Type of a function that is used to override the style of all Series created by ZoomBandChart.

param

The Series created by ZoomBandChart. The type of Series depends on the referenced series.

param

The Series that is being referenced. If AreaRangeSeries, series is also AreaRangeSeries. Otherwise, series is always LineSeries.

Variables

Const emptyFill

emptyFill: EmptyFill

Singleton object which indicates that shape should not be filled.

When emptyFill is used, the area that would be filled does NOT trigger mouse / touch -events, and its rendering process is skipped, which results in saved performance.

Const emptyLine

emptyLine: LineStyle

Singleton object which specifies that line should not be rendered.

When emptyLine is used, the line that would be rendered does NOT trigger mouse / touch -events, and its rendering process is skipped, which results in saved performance.

Const emptyTick

emptyTick: TickStyle

Singleton object which is used to disable Axis Ticks. Use with Axis.setTickStyle

When emptyTick is used, the whole logic of creating Axis Ticks is skipped, which results in saved performance.

Const transparentFill

transparentFill: SolidFill

A SolidFill singleton for a completely transparent fill. Can be useful in at least following cases:

1) User wants to hide something but still have it interactable by mouse/touch

2) User wants to hide something that does not support emptyFill

Otherwise, emptyFill should be preferred for better performance.

Const transparentLine

transparentLine: SolidLine

A SolidLine singleton for a completely transparent line. Can be useful in at least following cases:

1) User wants to hide something but still have it interactable by mouse/touch

2) User wants to hide something that does not support emptyFill

Otherwise, emptyLine should be preferred for better performance.

Functions

Const Animator

  • Animator(afterUpdate: function, fps: number): (Anonymous function)
  • Animator factory.

    Unpolished API, usage can be copied from Examples set but it is not further encouraged.

    Parameters

    • afterUpdate: function

      After all animation update callback

        • Returns void

    • Default value fps: number

      Desirable frame rate for all animations (Limited to around 60fps by browser)

    Returns (Anonymous function)

Const ColorHEX

  • ColorHEX(hexColor: string): Color
  • Factory for creating a Color object given a hexadecimal-formatted string. Supports the following input formats (value after '#' or '0x' is case insensitive):

    • #AARRGGBB or 0xAARRGGBB
    • #RRGGBB or 0xRRGGBB
    • #ARGB or 0xARGB
    • #RGB or 0xRGB

    Other formats will throw an Error!

    Example:

    let color = ColorHex('0xFF00AABB')
    color = ColorHex('0xff00aabb')
    color = ColorHex('#FF00AABB')
    color = ColorHex('#ff00aabb')
    color = ColorHex('0xF0AB')
    color = ColorHex('#F0AB')

    Color objects are seldom used independently, but rather used to form more sophisticated Settings-objects, such as:

    • FillStyles
    • LineStyles

    Parameters

    • hexColor: string

      Hexadecimal value for constructing a Color. Eq. #FF0000 = Red

    Returns Color

    Color object

Const ColorHSV

  • ColorHSV(hue: number, saturation: number, value: number): Color
  • Factory for creating a Color object from HSV values.

    Color objects are seldom used independently, but rather used to form more sophisticated Settings-objects, such as:

    • FillStyles
    • LineStyles

    Parameters

    • hue: number

      Hue in range [0, 360].

    • Default value saturation: number

      Saturation in range [0, 1]. Defaults to 1

    • Default value value: number

      Value in range [0, 1]. Defaults to 1

    Returns Color

    Color object

Const ColorRGBA

  • ColorRGBA(r: number, g: number, b: number, a: number): Color
  • Factory for creating a Color object given individual values for Red, Green, Blue and optionally Alpha -channels. Values are from 0 to 255.

    Color objects are seldom used independently, but rather used to form more sophisticated Settings-objects, such as:

    • FillStyles
    • LineStyles

    Parameters

    • r: number

      Red from 0 to 255

    • g: number

      Green from 0 to 255

    • b: number

      Blue from 0 to 255

    • Default value a: number

      Alpha from 0 to 255

    Returns Color

    Color object

Const SolidFillPalette

  • Factory for creating a SolidFill palette.

    Parameters

    • colorPalettes: PaletteFactory<Color>

      Collection of default colors from PaletteFactory

    • amount: number

      Amount of colors in the palette

    Returns Palette<FillStyle>

    A new SolidFill palette

Const _arrayXToPointArray

  • _arrayXToPointArray(arrayX: number[], step: number, start: number | undefined): Point[]
  • Pure implementation of transforming X value array to Point array for DataInputXY implementations.

    Parameters

    • arrayX: number[]

      Array of X-values.

    • Default value step: number

      Optional step between each Y coordinate. Defaults to 1.

    • start: number | undefined

      Start value for first generated Y-value. If undefined, Y values will start from 0.

    Returns Point[]

    Point Array, with automatically generated Y values.

Const _arrayXYToPointArray

  • _arrayXYToPointArray(arrayX: number[], arrayY: number[]): Point[]
  • Pure implementation of transforming X and Y value arrays to point for DataInputXY implementations.

    Parameters

    • arrayX: number[]

      Array of X-values

    • arrayY: number[]

      Array of Y-values

    Returns Point[]

    point array generated by mapping X and Y values

Const _arrayYToPointArray

  • _arrayYToPointArray(arrayY: number[], step: number, start: number | undefined): Point[]
  • Pure implementation of transforming Y value array to Point array for DataInputXY implementations.

    Parameters

    • arrayY: number[]

      Array of Y-values.

    • Default value step: number

      Optional step between each X coordinate. Defaults to 1.

    • start: number | undefined

      Start Value for first generated X-value. If undefined, X values will start from 0.

    Returns Point[]

    Point Array, with automatically generated X values.

Const _concatDataPointsFromSegments

  • _concatDataPointsFromSegments(segments: S[], getDataPointArrayFromVertexArray: function): DP
  • Pure function for concatting a single list of data points from a list of segments that have separate arrays for unprocessed and processed vertices. Note, that the vertices arrays can have a different type definition from data points Array, which is returned (eq. Junction segments).

    Type parameters

    • T: Array<unknown>

    • S: ShapeSet<T>

    • DP: Array<unknown>

    Parameters

    • segments: S[]

      List of segments.

    • Default value getDataPointArrayFromVertexArray: function

      Optionally injectable logic for cases where vertices arrays have different type from data points.

        • Parameters

          • vertexArray: T

          Returns DP

    Returns DP

    Concatted list of processed and unprocessed data points, without joints.

Const _shouldEmitHoverEvent

  • _shouldEmitHoverEvent(isCursorEnabled: boolean, eventer: Eventer, chart: Chart): boolean
  • Check if a Series contributes to a Chart's AutoCursor to determine if Series Hover event should be emitted.

    Parameters

    • isCursorEnabled: boolean

      Flag for Cursor enabled of Series

    • eventer: Eventer

      Eventer of the Series

    • chart: Chart

      Chart the Series belongs to, or undefined if the Chart is not a Chart2D instance.

    Returns boolean

    True if Series contributes to Chart's AutoCursor, false if not.

Const lerpRGBA

  • Linear interpolation between two Colors.

    Parameters

    • start: Color

      Color to start from.

    • target: Color

      Color to interpolate towards.

    • amount: number

      Amount to interpolate [0-1].

    Returns Color

    Color in between start and target colors.

Const lightningChart

  • Function for initializing the LightningChart library.

    Returns an object, with properties for creating different Charts and components. See LightningChart interface for all available properties.

    Parameters

    • Optional license: undefined | string

      Optional development or deployment license. If omitted, a community license will be used.

    • Optional licenseInformation: AppDeploymentLicenseInformation

      Additional information for license verification. Only required by Application Deployment license.

    Returns LightningChart

    A LightningChart object for creating Charts and components.

Const saveToFile

  • saveToFile(engine: PublicEngine, fileName: string, type: string, encoderOptions?: undefined | number): void
  • Capture rendered state in an image file. Prompts the browser to download the created file.

    NOTE: The download might be blocked by browser/plugins as harmful. To prevent this, only call the method in events tied to user-interactions. From mouse-event handlers, for example.

    Has two optional parameters which directly reference JavaScript API HTMLCanvasElement.toDataURL. For supported image formats, compression quality, Etc. refer to:

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL

    Example usage:

    Desired result Arguments
    Download 'screenshot.png' 'screenshot'
    Attempt download 'maybeNotSupported.bmp' 'maybeNotSupported', 'image/bmp'
    Attempt download jpeg.file with specified compression quality 'fileName', 'image/jpeg', 0.50

    Parameters

    • engine: PublicEngine
    • fileName: string

      Name of prompted download file as string. File extension shouldn't be included as it is automatically detected from 'type'-argument.

    • Default value type: string

      A DOMString indicating the image format. The default format type is image/png.

    • Optional encoderOptions: undefined | number

      A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92.

    Returns void

Const translatePoint

  • Translates a Point from one Scale to another.

    Parameters

    • value: Point

      Point

    • originScale: Vec2<Scale>

      Scale of value

    • targetScale: Vec2<Scale>

      Target Scale for translation

    Returns Point

    value translated to targetScale

Object literals

Const AnimationEasings

AnimationEasings: object

AnimationEasing collection to use with Animator.

ease

ease: function
    • Parameters

      • start: number
      • end: number
      • duration: number

      Returns Ease

easeIn

easeIn: function
    • Parameters

      • start: number
      • end: number
      • duration: number

      Returns Ease

easeOut

easeOut: function
    • Parameters

      • start: number
      • end: number
      • duration: number

      Returns Ease

linear

linear: function
    • Parameters

      • start: number
      • end: number
      • duration: number

      Returns Ease

Const AreaSeriesTypes

AreaSeriesTypes: object

Collection of AreaSeries implementations.

Used when creating an AreaSeries with ChartXY.addAreaSeries. Selected option tells what the returned Series type will be - different Series types can have different APIs !

  • Select AreaSeriesTypes.Positive to show only area above the baseline.
  • Select AreaSeriesTypes.Negative to show only area below the baseline.
  • Select AreaSeriesTypes.Both to show both areas from both sides of the baseline.

Bipolar

Type of AreaSeries that shows data on both sides of baseline.

Has individual styles for positive/negative areas.

Negative

Type of AreaSeries that only shows data that is below the baseline.

Positive

Type of AreaSeries that only shows data that is above the baseline.

Const AutoCursorBuilders

AutoCursorBuilders: object

Collection of AutoCursorBuilders.

AutoCursorBuilders are used to modify structure of *AutoCursors of Charts, by passing one when the *Chart is created.

Each item is associated with a specific Chart-type, that it can only be used with.

Spider

AutoCursorBuilder for SpiderChart.

Used to modify structure of AutoCursor, by passing one when creating a SpiderChart.

XY

AutoCursorBuilder for ChartXY.

Used to modify structure of AutoCursor, by passing one when creating a ChartXY.

Const AutoFitStrategies

AutoFitStrategies: object

Collection of AutoFitStrategyFactories.

Used with AutoCursors and *Markers setAutoFitStrategy() to customize logic for keeping *ResultTable in view.

Flip

Flip: _AutoFitByFlip

Factory for AutoFitStrategy which attempts to fit ResultTable by flipping it when it goes out of view.

Example usage:

ChartXY.setAutoCursor((autoCursor) => autoCursor.setAutoFitStrategy( AutoFitStrategies.Flip ))

FontSize

FontSize: _AutoFitByFontSize

Factory for AutoFitStrategyFactory for strategy which attempts to fit ResultTable by reducing its font size when it goes out of view.

Example usage:

ChartXY.setAutoCursor((autoCursor) => autoCursor.setAutoFitStrategy( AutoFitStrategies.FontSize(5, 5) ))

param

Optimal minimum font size that must be retained at all times. Defaults to 5

param

Count of steps strategy will attempt at fitting. Defaults to 5

Const AxisScrollStrategies

AxisScrollStrategies: object

Collection of available AxisScrollStrategies.

AxisScrollStrategies can be used to customize the behavior of Axis scrolling.

Use with Axis.setScrollStrategy

expansion

expansion: AxisScrollStrategy

Axis will scroll to fit Series that are out of view, but it won't shrink even if there is empty space (like "fitting" does).

fitting

fitting: AxisScrollStrategy

Axis will constantly scroll to fit attached Series.

progressive

progressive: AxisScrollStrategy

Axis will scroll to show new, progressive data, but will keep its interval constant - leaving older data out of view.

regressive

regressive: AxisScrollStrategy

Axis will scroll to show new, regressive data, but will keep its interval constant - leaving older data out of view.

Const AxisTickStrategies

AxisTickStrategies: object

Collection of AxisTickStrategies.

AxisTickStrategies modify logic of drawing Axis Ticks and formatting to better suit different user applications. For example, a DateTime Axis is created by selecting AxisTickStrategies.DateTime.

AxisTickStrategy must be specified when an Axis is created (or default one is used).

Numeric

Numeric: AxisTickStrategy

AxisTickStrategy for numeric axes. Formats values simply as numbers and tries to place ticks at round intervals.

Example usage:

Desired result Usage
Create Numeric X Axis ChartXY.addAxisX(undefined, AxisTickStrategies.Numeric)
Specify default X Axis as Numeric LightningChart.ChartXY({ defaultAxisXTickStrategy: AxisTickStrategies.Numeric })

NumericWithUnits

NumericWithUnits: AxisTickStrategy

AxisTickStrategy for numeric axes. Formats values as numbers and tries to utilize different units (K, M, Etc) for more compact display.

Can also be useful for not displaying fractions (for intervals bigger than 10).

Example usage:

Desired result Usage
Create NumericWithUnits X Axis ChartXY.addAxisX(undefined, AxisTickStrategies.NumericWithUnits)
Specify default X Axis as NumericWithUnits LightningChart.ChartXY({ defaultAxisXTickStrategy: AxisTickStrategies.NumericWithUnits })

DateTime

  • DateTime(origin: Date, locale?: undefined | string, options?: Intl.DateTimeFormatOptions): AxisTickStrategy
  • Factory for DateTime AxisTickStrategy. Formats values as Dates according to JavaScript API:

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

    Example usage:

    Desired result Usage
    Create DateTime X Axis that formats 0 as '1.1.1970' ChartXY.addAxisX(undefined, AxisTickStrategies.DateTime())
    Specify default X Axis as DateTime that formats 0 as '1.1.2019' LightningChart.ChartXY({ defaultAxisXTickStrategy: AxisTickStrategies.DateTime(2019, 0, 1) })
    DateTime formatting like: 'Thursday, 9 AM' AxisTickStrategies.DateTime(undefined, undefined, { weekday: 'long', hour: 'numeric' })

    Parameters

    • Default value origin: Date

      Origin date. Value 0 will be interpreted as this date. Defaults to javascript Date origin - January 1, 1970 UTC. Proper usage can drastically improve achievable zoom resolution

    • Optional locale: undefined | string

      Valid javascript Date locale string, that specifies a geographical, political or cultural region.

    • Optional options: Intl.DateTimeFormatOptions

      Valid javascript Intl.DateTimeFormat options object, that specifies a weekday, year, month and day formats.

    Returns AxisTickStrategy

Const ColorPalettes

ColorPalettes: object

Collection of default Color PaletteFactories.

Items are mostly functions that take a single argument, length, and return a Color Palette of that given length.

Color Palettes are functions that give a Color based on a given index.

arction

arction: function
    • Parameters

      • length: number

      Returns Palette<T>

arctionWarm

arctionWarm: function
    • Parameters

      • length: number

      Returns Palette<T>

cold

cold: function
    • Parameters

      • length: number

      Returns Palette<T>

flatUI

flatUI: function
    • Parameters

      • length: number

      Returns Palette<T>

fullSpectrum

fullSpectrum: function
    • Parameters

      • length: number

      Returns Palette<T>

reverseSpectrum

reverseSpectrum: function
    • Parameters

      • length: number

      Returns Palette<T>

warm

warm: function
    • Parameters

      • length: number

      Returns Palette<T>

sector

  • sector(start: number, end: number, saturation: number, vibrance: number): PaletteFactory<Color>
  • Parameters

    • start: number
    • end: number
    • Default value saturation: number
    • Default value vibrance: number

    Returns PaletteFactory<Color>

Const DataPatterns

DataPatterns: object

Options collection for selecting optimizations for data with a specific pattern. Knowing the pattern of incoming data can enable massive optimizations.

This must be specified when Series is created. Note, that not all Series support specifying pattern of data.

Example usage:

Desired result Usage
Create LineSeries with progressive data on X ChartXY.addLineSeries({ dataPattern: DataPatterns.HorizontalProgressivePattern })

If the Series is supplied with data that does not respect the given DataPattern, it might behave unexpectedly.

freeform

freeform: FreeFormPattern

Indicates that incoming data has no pattern, and can go in any direction from any given point. Data-point solving is EXTREMELY HEAVY for freeform data, consider using other DataPatterns if possible.

Example usage:

Desired result Usage
Create freeform LineSeries ChartXY.addLineSeries({ dataPattern: DataPatterns.freeform })

horizontalProgressive

horizontalProgressive: ProgressivePattern

Indicates that incoming data always progresses in positive X direction and enables optimizations for this scenario.

Example usage:

Desired result Usage
Create LineSeries with progressive data on X ChartXY.addLineSeries({ dataPattern: DataPatterns.horizontalProgressive })

horizontalRegressive

horizontalRegressive: ProgressivePattern

Indicates that incoming data always progresses in negative X direction and enables optimizations for this scenario.

Example usage:

Desired result Usage
Create LineSeries with regressive data on X ChartXY.addLineSeries({ dataPattern: DataPatterns.horizontalRegressive })

verticalProgressive

verticalProgressive: ProgressivePattern

Indicates that incoming data always progresses in positive Y direction and enables optimizations for this scenario.

Example usage:

Desired result Usage
Create LineSeries with progressive data on Y ChartXY.addLineSeries({ dataPattern: DataPatterns.verticalProgressive })

verticalRegressive

verticalRegressive: ProgressivePattern

Indicates that incoming data always progresses in negative Y direction and enables optimizations for this scenario.

Example usage:

Desired result Usage
Create LineSeries with regressive data on Y ChartXY.addLineSeries({ dataPattern: DataPatterns.verticalRegressive })

Const DefaultLibraryStyle

DefaultLibraryStyle: object

Collection of default styles used for the whole library.

Can be referenced in applications for mimicking style, or just fast access to some styles.

axisGridStrokeStyle

axisGridStrokeStyle: SolidLine

Default style for axis grid lines

axisLabelFillStyle

axisLabelFillStyle: SolidFill

Default fill style for axis labels

axisLabelFont

axisLabelFont: FontSettings

Default font for axis title

axisNibOverlayStyle

axisNibOverlayStyle: SolidFill

Default fill style for highlighted axis nibs (mouse-picking area)

axisNibStyle

axisNibStyle: SolidLine

Default line style for axis nibs

axisOverlayStyle

axisOverlayStyle: SolidFill

Default fill style for highlighted axes (mouse-picking area)

axisStyle

axisStyle: SolidLine

Default fill style for axes

axisTickStyle

axisTickStyle: SolidLine

Default style for axis ticks

axisTitleFillStyle

axisTitleFillStyle: SolidFill

Default fill style for axis title

axisTitleFont

axisTitleFont: FontSettings

Default font for axis title

chartBackgroundFillStyle

chartBackgroundFillStyle: SolidFill

Default fill style for chart background fill.

chartBackgroundStrokeStyle

chartBackgroundStrokeStyle: LineStyle

Default stroke style for chart background stroke.

chartXYFittingRectangleFillStyle

chartXYFittingRectangleFillStyle: EmptyFill

Default fill style for chart XY fitting rectangle

chartXYFittingRectangleStrokeStyle

chartXYFittingRectangleStrokeStyle: SolidLine

Default fill style for chart XY fitting rectangle stroke

chartXYTitleFont

chartXYTitleFont: FontSettings

Get default FontSettings for chart XY title

chartXYZoomingRectangleFillStyle

chartXYZoomingRectangleFillStyle: EmptyFill

Default fill style for chart XY zooming rectangle

chartXYZoomingRectangleStrokeStyle

chartXYZoomingRectangleStrokeStyle: SolidLine

Default fill style for chart XY zooming rectangle stroke

customTickGridStrokeStyle

customTickGridStrokeStyle: SolidLine

Default style for custom tick grid stroke.

dashboardBackgroundFillStyle

dashboardBackgroundFillStyle: SolidFill

Default fill style for Dashboard background

dashboardBackgroundStrokeStyle

dashboardBackgroundStrokeStyle: SolidLine

Default stroke style for Dashboard background.

dashboardSplitterStyle

dashboardSplitterStyle: SolidLine

Default fill style for Dashboard splitter lines

defaultBandFillStyle

defaultBandFillStyle: SolidFill

Default fill style for UI Band

defaultBandStrokeStyle

defaultBandStrokeStyle: LineStyle

Default stroke style for UI Band

defaultBoxFigureLineStyle

defaultBoxFigureLineStyle: SolidLine

Default line style for Box Figures Line

defaultBoxFigureMedianLineStyle

defaultBoxFigureMedianLineStyle: SolidLine

Default line style for Box Figures Median Line

defaultBoxFigureStrokeStyle

defaultBoxFigureStrokeStyle: SolidLine

Default line style for Box Figures stroke

defaultBoxFigureStyle

defaultBoxFigureStyle: SolidFill

Default fill style for Box Figures

defaultCandleStickNegativeStyle

defaultCandleStickNegativeStyle: SolidFill

Default negative fill style for OHLC candle sticks

defaultCandleStickPositiveStyle

defaultCandleStickPositiveStyle: SolidFill

Default positive fill style for OHLC candle sticks

defaultCandleStickStyle

defaultCandleStickStyle: SolidLine

Default line style for OHLC candle sticks

defaultConstantLineStrokeStyle

defaultConstantLineStrokeStyle: SolidLine

Default stroke style for Axis ConstantLine

defaultLineSeriesStyle

defaultLineSeriesStyle: SolidLine

Default line series line style

defaultMountainsFillStyle

defaultMountainsFillStyle: SolidFill

Default style for filling of mountain-series (Area AreaRange).

defaultMountainsInvertedFillStyle

defaultMountainsInvertedFillStyle: SolidFill

Default style for inverted filling of mountain-series (Area AreaRange).

defaultMountainsInvertedStrokeStyle

defaultMountainsInvertedStrokeStyle: SolidLine

Default style for inverted strokes of mountain-series (Area AreaRange).

defaultMountainsStrokeStyle

defaultMountainsStrokeStyle: SolidLine

Default style for strokes of mountain-series (Area AreaRange).

defaultOHLCBarNegativeStyle

defaultOHLCBarNegativeStyle: SolidLine

Default line style for negative OHLC Bars

defaultOHLCBarPositiveStyle

defaultOHLCBarPositiveStyle: SolidLine

Default line style for positive OHLC Bars

funnelChartTitleFont

funnelChartTitleFont: FontSettings

Default FontSettings for Funnel Chart title.

funnelLabelConnectorStyle

funnelLabelConnectorStyle: SolidLine

Default LineStyle for Funnel Label connectors.

funnelLabelFillStyle

funnelLabelFillStyle: SolidFill

Default fillStyle for Funnel Labels.

funnelLabelFont

funnelLabelFont: FontSettings

Default FontSettings for Funnel Labels.

funnelSliceFillStylePalette

funnelSliceFillStylePalette: function

Default FillStyle Palette for Funnel Slices.

    • Parameters

      • index: number

      Returns T

funnelSliceStrokeStyle

funnelSliceStrokeStyle: LineStyle

Default LineStyle for Funnel Slices Stroke.

panelBackgroundFillStyle

panelBackgroundFillStyle: SolidFill

Default fill style for Panel background

panelBackgroundStrokeStyle

panelBackgroundStrokeStyle: LineStyle

Default stroke style for Panel background.

pieChartTitleFont

pieChartTitleFont: FontSettings

Default FontSettings for Pie Chart title.

pieLabelConnectorStyle

pieLabelConnectorStyle: SolidLine

Default LineStyle for Pie Label connectors.

pieLabelFillStyle

pieLabelFillStyle: SolidFill

Default fillStyle for Pie Labels.

pieLabelFont

pieLabelFont: FontSettings

Default FontSettings for Pie Labels.

pieSliceFillStylePalette

pieSliceFillStylePalette: function

Default FillStyle Palette for Pie Slices.

    • Parameters

      • index: number

      Returns T

pieSliceStrokeStyle

pieSliceStrokeStyle: LineStyle

Default LineStyle for Pie Slices stroke.

pointLinePointFillStyle

pointLinePointFillStyle: SolidFill

Default fill style for point line series points

pointMarkerFillStyle

pointMarkerFillStyle: SolidFill

Default fill style for Cursor PointMarker

pointMarkerStrokeStyle

pointMarkerStrokeStyle: LineStyle

Default line style for Cursor PointMarker

pyramidChartTitleFont

pyramidChartTitleFont: FontSettings

Default FontSettings for Pyramid Chart title.

pyramidLabelConnectorStyle

pyramidLabelConnectorStyle: SolidLine

Default LineStyle for Pyramid Label connectors.

pyramidLabelFillStyle

pyramidLabelFillStyle: SolidFill

Default fillStyle for Pyramid Labels.

pyramidLabelFont

pyramidLabelFont: FontSettings

Default FontSettings for Pyramid Labels.

pyramidSliceFillStylePalette

pyramidSliceFillStylePalette: function

Default FillStyle Palette for Pyramid Slices.

    • Parameters

      • index: number

      Returns T

pyramidSliceStrokeStyle

pyramidSliceStrokeStyle: LineStyle

Default LineStyle for Pyramid Slices Stroke.

resultTableFillStyle

resultTableFillStyle: SolidFill

Default fill style for Cursor ResultTable

resultTableStrokeStyle

resultTableStrokeStyle: SolidLine

Default line style for Cursor ResultTable

resultTableTextStyle

resultTableTextStyle: SolidFill

Default fill style for Cursor ResultTable text

segmentSeriesStyle

segmentSeriesStyle: SolidLine

Default line style for segment series

seriesStyle

seriesStyle: SolidFill

Default fill style for Series

spiderAxisLabelFillStyle

spiderAxisLabelFillStyle: SolidFill

Default FillStyle for Spider axis labels.

spiderAxisLabelFont

spiderAxisLabelFont: FontSettings

Default FontSettings for Spider axis labels.

spiderAxisStyle

spiderAxisStyle: SolidLine

Default axis line style for Spider Chart.

spiderChartTitleFont

spiderChartTitleFont: FontSettings

Default FontSettings for Spider Chart title.

spiderScaleLabelFillStyle

spiderScaleLabelFillStyle: SolidFill

Default FillStyle for Spider scale labels.

spiderScaleLabelFont

spiderScaleLabelFont: FontSettings

Default FontSettings for Spider scale labels.

spiderSeriesFillStyle

spiderSeriesFillStyle: SolidFill

Fill style using an opaque white color.

spiderSeriesStrokeStyle

spiderSeriesStrokeStyle: SolidLine

Default series fill style for Spider Chart.

spiderWebStyle

spiderWebStyle: SolidLine

Default web line style for Spider Chart.

uiBackgroundFillStyle

uiBackgroundFillStyle: SolidFill

Default fill style for UI Element Background

uiBackgroundStrokeStyle

uiBackgroundStrokeStyle: SolidLine

Default stroke style for UI Element Background

uiButtonFillStyle

uiButtonFillStyle: SolidFill

Default fill style for UI Button

uiButtonSize

uiButtonSize: number

Default size for UI Button

uiTextFillStyle

uiTextFillStyle: SolidFill

Default fill style for UI Text

styleButton

  • styleButton(button: StylableButton, fillStyle: FillStyle): void
  • Function that styles a 'Button' given a single FillStyle (default design for Buttons).

    Parameters

    • button: StylableButton
    • fillStyle: FillStyle

    Returns void

Const FunnelChartTypes

FunnelChartTypes: object

Collection of FunnelChart implementations. Each option can have their own visual design, and API for customization of it.

This must be specified when the FunnelChart is created (or default one will be used).

Example usage:

Desired result Usage
Create a FunnelChart with default type LightningChart.Funnel()
Create a FunnelChart with specified type LightningChart.Funnel({ type: FunnelChartTypes.LabelsInsideSlices })

LabelsInsideSlices

Funnel Chart type, where Slice Labels inside the Slices.

LabelsOnSides

Funnel Chart type, where Slice Labels are positioned on the either left or right sides of Chart. The side can be set using setLabelSide Labels are connected to their Slices with lines, which can be styled using unique API for this Funnel Chart type.

Const GaugeChartTypes

GaugeChartTypes: object

Collection of GaugeChart implementations. Each option can have their own visual design, and API for customization of it.

This must be specified when the GaugeChart is created (or default one will be used).

Example usage:

Desired result Usage
Create a GaugeChart with specified type LightningChart.Gauge({ type: GaugeChartTypes.Solid })

Solid

Solid: SolidGauge

Solid Gauge Chart type, which contains a single slice represents a value within the interval.

Const IntensitySeriesTypes

IntensitySeriesTypes: object

Grid

IntensityGridSeries for visualization of magnitude in two dimensions.

Mesh

IntensityMeshSeries for visualization of magnitude in two dimensions.

Mesh allows to edit the geometry of the displayed intensity series.

Const LegendBoxBuilders

LegendBoxBuilders: object

Collection of available LegendBox builders. To build LegendBoxes you must pass one of these to method: *addLegendBox()**. This method can be accessed through *Charts, Dashboard, Etc.

Example usage:

Desired result Usage
Create a HorizontalLegendBox on a ChartXY ChartXY.addLegendBox(LegendBoxBuilders.TextBox)
Create a HorizontalLegendBox on a Dashboard Dashboard.addLegendBox(LegendBoxBuilders.CheckBox)

HorizontalLegendBox

HorizontalLegendBox: UILegendBoxBuilder<InternalBackground, UITextBox<UIBackground>, LegendBoxEntry>

Horizontal implementation of LegendBox.

Lays out each unique group after one another horizontally. Items inside each group are layed out vertically.

Example usage:

Desired result Usage
Create a Horizontal LegendBox Chart.addUIElement(UIElementBuilders.HorizontalLegendBox)

VerticalLegendBox

VerticalLegendBox: UILegendBoxBuilder<InternalBackground, UITextBox<UIBackground>, LegendBoxEntry>

Vertical implementation of LegendBox.

Lays out each unique group after one another vertically. Items inside each group are layed out horizontally.

Example usage:

Desired result Usage
Create a Vertical LegendBox Chart.addUIElement(UIElementBuilders.VerticalLegendBox)

Const MarkerBuilders

MarkerBuilders: object

Collection of StaticCursorBuilders.

StaticCursorBuilder*s are used to modify structure of *Markers, by passing one when the Marker is created.

Each item is associated with a specific Chart-type, that it can only be used with.

XY

StaticCursorBuilder for creation of MarkerXY.

Used to modify structure of MarkerXY when it is created. There are two versions of MarkerXY:

Const OHLCFigures

OHLCFigures: object

Collection of OHLCFigure options.

Used for selecting different figure designs for OHLCSeries. eq.

Example usage:

Desired result Usage
Specify OHLCFigure of OHLCSeries ChartXY.addOHLCSeries(undefined, undefined, OHLCFigures.Candlestick)

Bar

Bar: OHLCBar

Bar OHLCFigure.

Candlestick

Candlestick: OHLCCandleStick

Candlestick OHLCFigure.

Const OHLCSeriesTypes

OHLCSeriesTypes: object

Collection of OHLCSeries types.

By default, OHLCSeries will be OHLCSeriesTraditional, but different types can be created with these options. Note, that based on the selection the Series can have different API!

Example usage:

Desired result Usage
Create OHLCSeries with automatic packing ChartXY.addOHLCSeries(undefined, undefined, undefined, undefined, OHLCSeriesTypes.AutomaticPacking)

AutomaticPacking

OHLCSeries type that takes data as X-progressive Points. The Series automatically packs these into OHLC-segments.

If this option is selected, the "add()"-method of the created Series will only accept Points, rather than XOHLC-values.

Normal

OHLCSeries type that takes data traditionally in XOHLC-tuples.

Const PieChartTypes

PieChartTypes: object

Collection of PieChart implementations. Each option can have their own visual design, and API for customization of it.

This must be specified when the PieChart is created (or default one will be used).

Example usage:

Desired result Usage
Create a PieChart with specified type LightningChart.Pie({ type: PieChartTypes.LabelsInsideSlices })

LabelsInsideSlices

LabelsInsideSlices: PieChartWithLabelsInsideSlices

Pie Chart type, where Slice Labels inside the Slices. Works well when Label texts are short and there are not a lot of Slices, as the actual Pie has more space.

LabelsOnSides

Pie Chart type, where Slice Labels are positioned on the left and right sides of Chart. Labels are connected to their Slices with lines, which can be styled using unique API for this Pie Chart type.

Const PointMarkers

PointMarkers: object

Collection of available PointMarker implementations.

PointMarkers are interactable UIElements that belong to AutoCursors and Markers, indicating their location.

PointMarker can be specified when creating an AutoCursor or Marker, by method of their builder.

Example usage:

Desired result Usage
Create SeriesMarkerXY with specified PointMarker SeriesXY.addMarker(MarkerBuilders.XY.setPointMarker(PointMarkers.UICircle))
Specify PointMarker of AutoCursor LightningChart.ChartXY({ autoCursorBuilder: AutoCursorBuilders.XY.setPointMarker(PointMarkers.UIDiamond) })

None

None: EmptyPointMarker

No pointMarker.

UICircle

UICircle: UICircle

Circular pointMarker.

UIDiamond

UIDiamond: UIDiamond

45 degree rotated rectangle pointMarker.

UIRectangle

UIRectangle: UIRectangle

Rectangular pointMarker.

Const PyramidChartTypes

PyramidChartTypes: object

Collection of PyramidChart implementations. Each option can have their own visual type, and API for customization of it.

This must be specified when the PyramidChart is created (or default one will be used).

Example usage:

Desired result Usage
Create a PyramidChart with default type LightningChart.Pyramid()
Create a PyramidChart with specified type LightningChart.Pyramid({ type: PyramidChartTypes.LabelsInsideSlices })

LabelsInsideSlices

Pyramid Chart type, where Slice Labels inside the Slices.

LabelsOnSides

Pyramid Chart type, where Slice Labels are positioned on the either left or right sides of Chart. The side can be set using setLabelSide Labels are connected to their Slices with lines, which can be styled using unique API for this Pyramid Chart type.

Const SliceLabelFormatters

SliceLabelFormatters: object

Collection of some example implementations of SliceLabelFormatters.

Use with SlicedCharts.setLabelFormatter

Example usage:

Desired result Usage
Use a default implementation SlicedCharts.setLabelFormatter(SliceLabelFormatters.NamePlusRelativeValue)
Use a custom implementation SlicedCharts.setLabelFormatter((slice, relativeValue) => slice.getValue() + ' €')

Name

Name: function

Slice Label formatter for ${name}.

    • Parameters

      • slice: T
      • relativeValue: number

      Returns string

NamePlusRelativeValue

NamePlusRelativeValue: function

Slice Label formatter for ${name}: ${(relativeValue * 100).toFixed(1)}%.

    • Parameters

      • slice: T
      • relativeValue: number

      Returns string

NamePlusValue

NamePlusValue: function

Slice Label formatter for ${name}: ${Math.round(animatedValue)}.

    • Parameters

      • slice: T
      • relativeValue: number

      Returns string

Const SliceSorters

SliceSorters: object

Collection of some example implementations of SliceSorter

Use with SlicedCharts.setSliceSorter

Example usage:

Desired result Usage
Use a default implementation SlicedCharts.setSliceSorter(SliceSorters.SortByValueDescending)
Use a custom implementation SlicedCharts.setSliceSorter((a, b) => a.getValue() - b.getValue())

None

None: function

Disabled Slice sorting.

    • Parameters

      • sliceA: T
      • sliceB: T

      Returns number

SortByName

SortByName: function

SliceSorter that sorts Slices based on their names using JS API: String.localeCompare.

    • Parameters

      • sliceA: T
      • sliceB: T

      Returns number

SortByValueAscending

SortByValueAscending: function

SliceSorter that sorts Slices to ascending value order.

    • Parameters

      • sliceA: T
      • sliceB: T

      Returns number

SortByValueDescending

SortByValueDescending: function

SliceSorter that sorts Slices to descending value order.

    • Parameters

      • sliceA: T
      • sliceB: T

      Returns number

Const Themes

Themes: object

Themes used to set the coloring scheme of all elements in Dashboard, Charts, UIElements. A Theme can be passed to a Dashboard or Chart as a parameter upon creation.

dark

dark: Theme

A predominantly dark theme.

light

light: Theme

Theme with light backgrounds.

Const UIBackgrounds

UIBackgrounds: object

Collection of available UIBackgrounds Can be used to customize the background of an UIElement.

Background must be specified when the UIElement is created by method of its builder.

Example usage:

Desired result Usage
Create TextBox with specified Background Chart.addUIElement(UIElementBuilders.TextBox.setBackground(UIBackgrounds.Circle))

Circle

Circle: UICircle

Circular background.

Diamond

Diamond: UIDiamond

45 degree rotated rectangle background.

None

No background.

Pointer

Pointer: UIPointer

Arrow-like background.

The Pointers direction can be modified by, for example:

UIElement.setBackground((pointer) => pointer.setDirection(UIDirections.Up))

This will throw an error if used on an UIElement with any other Background!

Rectangle

Rectangle: UIRectangle

Rectangular background.

Const UIButtonPictures

UIButtonPictures: object

Collection of available UIButtonPicture*s. Can be used to customize the shape of buttons and checkboxes of *UIElements.

ButtonPicture must be specified when the UIElement is created by method of its builder.

Example usage:

Desired result Usage
Create ButtonBox with specified ButtonPicture Chart.addUIElement(UIElementBuilders.ButtonBox.setPictureOff(UIButtonPictures.Circle))
Create LegendBox with specified ButtonPicture Chart.addUIElement(UIElementBuilders.HorizontalLegendBox.setEntry(UIElementBuilders.TextBox.setPictureOff(UIButtonPictures.Circle)))

Circle

Circle: UICircle

Circular picture.

Diamond

Diamond: UIDiamond

45 degree rotated rectangle picture.

Rectangle

Rectangle: UIRectangle

Rectangular picture.

Const UIElementBuilders

UIElementBuilders: object

Collection of available UIElement builders. To build UIElements you must pass one of these to method: addUIElement(). This method can be accessed through Charts, Dashboard, Etc.

Example usage:

Desired result Usage
Create a TextBox on a ChartXY ChartXY.addUIElement(UIElementBuilders.TextBox)
Create a CheckBox on a Dashboard Dashboard.addUIElement(UIElementBuilders.CheckBox)

ButtonBox

UIElement that displays a button and text over a Background.

By default, Background is empty. To show it you must specify it using method of the builder, setBackground

Example usage:

Desired result Usage
Create a ButtonBox Chart.addUIElement(UIElementBuilders.ButtonBox)
Create a ButtonBox with specified Background Chart.addUIElement(UIElementBuilders.ButtonBox.setBackground(UIBackgrounds.Circle))
Create a ButtonBox with specified ButtonPicture Chart.addUIElement(UIElementBuilders.ButtonBox.setPictureOff(UIButtonPictures.Diamond))

CheckBox

UIElement that displays a toggleable checkbox and text over a Background.

By default, Background is empty. To show it you must specify it using method of the builder, setBackground

Example usage:

Desired result Usage
Create a CheckBox Chart.addUIElement(UIElementBuilders.CheckBox)
Create a CheckBox with specified Background Chart.addUIElement(UIElementBuilders.CheckBox.setBackground(UIBackgrounds.Circle))
Create a CheckBox with specified ButtonPicture Chart.addUIElement(UIElementBuilders.CheckBox.setPictureOff(UIButtonPictures.Diamond))

PointableTextBox

UIElement that displays text over a PointableBackground

Direction can be changed with PointableTextBox.setDirection

Example usage:

Desired result Usage
Create a PointableTextBox Chart.addUIElement(UIElementBuilders.PointableTextBox)
Create a PointableTextBox with specified PointableBackground Not supported there is currently only one implementation of PointableBackground

TextBox

UIElement that displays text over a Background.

By default, Background is empty. To show it you must specify it using method of the builder, setBackground

Example usage:

Desired result Usage
Create a TextBox Chart.addUIElement(UIElementBuilders.TextBox)
Create a TextBox with specified Background Chart.addUIElement(UIElementBuilders.TextBox.setBackground(UIBackgrounds.Circle))

Const UILayoutBuilders

UILayoutBuilders: object

Collection of UIElementBuilders for *Layouts. These allow positioning multiple *UIElements relative to each other.

Column

UIElement for column layout, added UIElements will be layed out after one another vertically. Has a Background.

By default, Background is hidden (style = emptyFill). To show it you must give it a style with: UIColumn.setFillStyle

Example usage:

Desired result Usage
Create a Column Chart.addUIElement(UILayouts.Column)
Create a Column with specified Background Chart.addUIElement(UILayouts.Column.setBackground(UIBackgrounds.Circle))

Row

UIElement for row layout, added UIElements will be layed out after one another horizontally. Has a Background.

By default, Background is hidden (style = emptyFill). To show it you must give it a style with: UIRow.setFillStyle

Example usage:

Desired result Usage
Create a Row Chart.addUIElement(UILayouts.Row)
Create a Row with specified Background Chart.addUIElement(UILayouts.Row.setBackground(UIBackgrounds.Circle))

Const UIOrigins

UIOrigins: object

Collection of fast-access arguments for UIElement.setOrigin

Center

Center: Point

CenterBottom

CenterBottom: Point

CenterTop

CenterTop: Point

LeftBottom

LeftBottom: Point

LeftCenter

LeftCenter: Point

LeftTop

LeftTop: Point

RightBottom

RightBottom: Point

RightCenter

RightCenter: Point

RightTop

RightTop: Point

Const xDimensionStrategy

xDimensionStrategy: object

MultidimensionalStrategy for X Dimension

getHeight

  • getHeight(size: Vec2<T>): T
  • Parameters

    • size: Vec2<T>

      Two dimensional value height of which has to be extracted

    Returns T

    Height of Vec2

getWidth

  • getWidth(size: Vec2<T>): T
  • Parameters

    • size: Vec2<T>

      Two dimensional value width of which has to be extracted

    Returns T

    Width of Vec2

toPoint

  • toPoint(value: number, height: number): Point
  • Combine argument with the tick value to create relevant Vec2

    Parameters

    • value: number
    • height: number

      Value on height Scale units

    Returns Point

    Vec2 which represents relevant for custom tick position

toVec2

  • toVec2(value: T, height: T): object
  • Combine argument with the tick value to create relevant Vec2

    Parameters

    • value: T
    • height: T

      Value on height Scale units

    Returns object

    Vec2 which represents relevant for custom tick position

Const yDimensionStrategy

yDimensionStrategy: object

MultidimensionalStrategy for X Dimension

getHeight

  • getHeight(size: Vec2<T>): T
  • Parameters

    • size: Vec2<T>

      Two dimensional value height of which has to be extracted

    Returns T

    Height of Vec2

getWidth

  • getWidth(size: Vec2<T>): T
  • Parameters

    • size: Vec2<T>

      Two dimensional value width of which has to be extracted

    Returns T

    Width of Vec2

toPoint

  • toPoint(value: number, height: number): Point
  • Combine argument with the tick value to create relevant Vec2

    Parameters

    • value: number
    • height: number

      Value on height Scale units

    Returns Point

    Vec2 which represents relevant for custom tick position

toVec2

  • toVec2(value: T, height: T): object
  • Combine argument with the tick value to create relevant Vec2

    Parameters

    • value: T
    • height: T

      Value on height Scale units

    Returns object

    Vec2 which represents relevant for custom tick position