interface AddSeriesOptions {
    paneIndex?: number;
    priceFormat?: PriceFormat;
    priceScaleId?: PriceScaleId;
    style?: SeriesStyle;
    transform?: SeriesTransformSpec;
}

Properties

paneIndex?: number

Target pane index. Omitted means the primary price pane wherever it sits (slot 0 until something moves it, see Chart.primaryPaneIndex). Higher panes are created on demand. An index that is not a whole number of 0 or more throws a RangeError and adds nothing.

priceFormat?: PriceFormat

Value formatting applied to this series' price scale (axis + crosshair tag): price (tick-size precision), volume (compact 1.2K / 3.4M / 5.6B), percent (a % suffix at a fixed precision), or a custom formatter.

percent suffixes the value as it stands and does not scale it: a study that already returns 0..100 reads 62.24%, and one that returns a 0..1 fraction reads 0.62%. Multiplying here would put the axis and the plotted value into disagreement, which is the one thing a formatter must never do.

priceScaleId?: PriceScaleId

Which price axis this series maps to. 'right' (default) and 'left' each draw an axis and autoscale independently; '' is a hidden overlay scale (no axis) for a volume histogram inside the price pane.

style?: SeriesStyle

Style overrides merged onto the chart type's defaults.

Have the chart apply a price-driven transform to the bars this series is given, as Chart.setSeriesTransform does. The series draws with type, so a host passes the transform's own renderer (getSeriesTransform(type).renderer) unless it wants another. An unknown type or invalid option throws.