Interface OHLCSeriesOptions<Type>

Interface for readonly configuration of OHLCSeries.

Commonly used properties:

  • xAxis: Attach series on non-default X Axis.
  • yAxis: Attach series on non-default Y Axis.
  • type: Select how trading data is displayed (candlesticks, bars, etc.).

Example usage:

 // Example 1, create series with default configuration.
const series = ChartXY.addOHLCSeries({})
 // Example 2, display data as bars
const series = ChartXY.addOHLCSeries({
type: OHLCSeriesTypes.Bars
})

See also addOHLCSeries.

Type Parameters

Hierarchy

  • SeriesOptionsXY
    • OHLCSeriesOptions

Properties

automaticColorIndex?: number

Optional index to use for automatic coloring of series.

Normally series are automatically colored differently when you create several series in the same chart. However, in some cases you might want to alter this order of automatic coloring, or use the automatic color palettes on series that belong to different charts.

In these scenarios you can use automaticColorIndex to tell each series individually what is its place in the default color palette.

 // Create series using the first color in default Theme palette.
const series1 = chart.addLineSeries({ automaticColorIndex: 0 })
// Create another series colored with the 3rd color.
const series2 = chart.addLineSeries({ automaticColorIndex: 2 })
type?: Type

Specify how trading data is displayed (candlesticks, bars, etc.).

Available options are listed and accessed via OHLCSeriesTypes.

 // Example
const candlestickSeries = ChartXY.addOHLCSeries({ type: OHLCSeriesTypes.Candlesticks })
xAxis?: Axis

Optional non-default X Axis to attach series to.

By default, series are attached to the same X Axis, that is returned by getDefaultAxisX.

yAxis?: Axis

Optional non-default Y Axis to attach series to.

By default, series are attached to the same Y Axis, that is returned by getDefaultAxisY.