Switching the Series Type

You can change the series type on the fly if the current type and the new one have the same or similar fields. See the list of supported series to find out what series types can be converted to each other.

To switch the series use seriesType() method of a series and set the series name as a string parameter. Series names used as parameters are identical the methods used for creating the series. Let's create a couple of samples to make it clear how to use the feature.

Please note that the range area series uses only two values from the data set, but it works because it shares the default names of data fields ("low" and "high") with Japanese candlestick and OHLC series. So, series types do not have to use the same number of fields to be convertible to each other.

You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.