Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ChartXYOptions<CursorPointMarkerType, CursorResultTableBackgroundType>

Interface for readonly configuration of ChartXY.

Some properties of ChartXY can only be configured when it is created. These arguments are all optional, and are wrapped in a single object parameter:

 // Example, configure default X Axis.
 const chart = LightningChart.ChartXY({
     defaultAxisX: {
         type: 'linear',
     }
 })

Watch out! The full set of available readonly configuration parameters depends on if the chart is standalone, or inside a dashboard:

For standalone ChartXY, more parameters are documented in LightningChart.ChartXY.

For dashboard ChartXY, more parameters are documented in Dashboard.createChartXY.

Commonly used properties:

Example usage:

 // Example 1, create chart with default configuration.
 const chart = LightningChart.ChartXY({})
 // Example 2, create chart with specified color theme.
 const chart = LightningChart.ChartXY({
     theme: Themes.light,
 })
 // Example 3, create chart with specified default axis configurations.
 const chart = LightningChart.ChartXY({
     defaultAxisX: {
         type: 'linear',
     },
     defaultAxisY: {
         type: 'logarithmic',
         base: 10,
     }
 })

Index

Properties

Optional autoCursorBuilder

autoCursorBuilder : AutoCursorXYBuilder<CursorPointMarkerType, CursorResultTableBackgroundType>

Builder for the charts' auto cursor. Use AutoCursorBuilders.XY to modify the default builder, using methods of AutoCursorXYBuilder.

 // Example, change cursor ResultTable background shape.
 const chart = LightningChart.ChartXY({
     autoCursorBuilder: AutoCursorBuilders.XY
         .setResultTableBackground(UIBackgrounds.Circle)
 })

Optional defaultAxisX

defaultAxisX : AxisOptions

Interface for specifying Axis X configurations that can't be changed after creation of the Axis.

Example usage:

  • Configure default X Axis of chart on opposite side to default configuration (top).
 ChartXY({
     defaultAxisX: {
         opposite: true,
     }
 })
  • Configure default X Axis of chart as logarithmic (10 base).
 ChartXY({
     defaultAxisX: {
         type: 'logarithmic',
         base: 10,
     }
 })

NOTE: Not all series types support logarithmic axes! Attaching a non-supported Series will crash the application.

List of series that support logarithmic Axes:

List of series that do not support logarithmic Axes:

Optional defaultAxisY

defaultAxisY : AxisOptions

Interface for specifying Axis Y configurations that can't be changed after creation of the Axis.

Example usage:

  • Configure default Y Axis of chart on opposite side to default configuration (top).
 ChartXY({
     defaultAxisY: {
         opposite: true,
     }
 })
  • Configure default Y Axis of chart as logarithmic (10 base).
 ChartXY({
     defaultAxisY: {
         type: 'logarithmic',
         base: 10,
     }
 })

NOTE: Not all series types support logarithmic axes! Attaching a non-supported Series will crash the application.

List of series that support logarithmic Axes:

List of series that do not support logarithmic Axes:

Optional disableAnimations

disableAnimations : undefined | false | true

Convenience flag that can be used to disable all animations in a component.

Optional theme

theme : Theme

Color theme for the component.

A collection of default implementations can be accessed by Themes.

 // Example, specify color theme of chart.
 const chart = LightningChart.ChartXY({
     theme: Themes.light
 })