iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
The Band Series Type
High-Low Fill or Band Series are provided by the SCIFastBandRenderableSeries
type. This accepts data (X, Y, Y1
) from a SCIXyyDataSeries
and renders two lines with a polygon, which changes color depending on whether Y > Y1
or vice versa.
NOTE: For more info about
SCIXyyDataSeries
, as well as other DataSeries types in SciChart, see the DataSeries API article.
The Band Series can be used to render profit & loss (green / red above or below a zero line), shaded areas of interest, technical indicators such as MACD and Ichimoku, or to simply shade an area above or below a threshold.
NOTE: Examples for the Band Series can be found in the SciChart iOS Examples Suite as well as on GitHub:
The SCIFastBandRenderableSeries
class allows to specify Fill, FillY1 brushes and Stroke, StrokeY1 pens via the following properties:
SCIFastBandRenderableSeries.fillBrushStyle
SCIFastBandRenderableSeries.fillY1BrushStyle
ISCIRenderableSeries.strokeStyle
SCIFastBandRenderableSeries.strokeY1Style
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.
Digital (Step) Band Series
In addition to the above, SCIFastBandRenderableSeries
can be configured to drawn as Digital (Step) Band. It is achieved via the
SCIFastBandRenderableSeries.isDigitalLine
property.
Create a Band Series
To create a Band Series, use the following code:
Band Series Features
Band Series also has some features similar to other series, such as:
Render a Gap in a Band Series
It’s possible to render a Gap in Band series, by passing a data point with a NaN
as the Y and Y1
value. Please refer to the RenderableSeries APIs article for more details. The SCIFastBandRenderableSeries
, however, allows to specify how a gap should appear. You can treat NAN
values as gaps or close the line. That’s defined by the SCIRenderableSeriesBase.drawNaNAs
property (Please see SCILineDrawMode
enumeration).
Add Point Markers onto a Band Series
Every data point of a Band Series can be marked with a ISCIPointMarker
. To add Point Markers to a Band Series use the ISCIRenderableSeries.pointMarker
property. For more information and code examples, please refer to the PointMarkers API article.
Paint Band Area Parts with Different Colors
In SciChart, you can draw Band Series segments with different colors using the PaletteProvider API.
To Use palette provider for Band Series - a custom ISCIFillPaletteProvider
(or ISCIStrokePaletteProvider
) has to be provided to the ISCIRenderableSeries.paletteProvider
property. Please refer to the PaletteProvider API article for more info.