
iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
The OHLC Series Type
The OHLC series are provided by the SCIFastOhlcRenderableSeries
type. This accepts data (X, Open, High, Low, Close
) from a SCIOhlcDataSeries
and renders OHLC bar at each X-Value
coordinate.
NOTE: For more info about
SCIOhlcDataSeries
, as well as other DataSeries types in SciChart, see the DataSeries API article.
NOTE: Examples of the OHLC Series can be found in the SciChart iOS Examples Suite as well as on GitHub:
The SCIFastOhlcRenderableSeries
is very much alike the SCIFastCandlestickRenderableSeries
class. It allows to specify StrokeUp and StrokeDown pens as well as relative DataPointWidth, which will be applied to every bar. Mentioned settings can be accessed via the following properties:
SCIOhlcRenderableSeriesBase.strokeUpStyle
- applied to bars when Close <= Open.SCIOhlcRenderableSeriesBase.strokeDownStyle
- applied to bars when Close > Open.SCIOhlcRenderableSeriesBase.dataPointWidth
- specifies how much space a single bar occupies, varying from 0 to 1 (when columns are conjoined).
NOTE: To learn more about Pens and Brushes and how to utilize them, please refer to the SCIPenStyle, SCIBrushStyle and SCIFontStyle article.
NOTE: In multi axis scenarios, a series has to be assigned to particular X and Y axes. This can be done passing the axes IDs to the
ISCIRenderableSeries.xAxisId
,ISCIRenderableSeries.yAxisId
properties.
Create an OHLC Series
To create an OHLC Series, use the following code:
OHLC Series Features
OHLC Series also has some features similar to other series, such as:
Render a Gap in an OHLC Series
It’s possible to render a Gap in OHLC series, by passing a data point with a NaN
as the Open, High, Low, Close
values. Please refer to the RenderableSeries APIs article for more details.
Specify Color for Individual Bars
In SciChart, you can draw each bar of the OHLC Series with different colors using the PaletteProvider API.
To Use palette provider for OHLC Series - a custom ISCIStrokePaletteProvider
has to be provided to the ISCIRenderableSeries.paletteProvider
property. Please refer to the PaletteProvider API article for more info.