iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

Axis Alignment - Create a Vertical Chart

It is possible to create Vertical (Rotated) Charts with SciChart. To achieve this, simply set ISCIAxis.axisAlignment to Left or Right for X Axis and Top or Bottom for Y Axis using the SCIAxisAlignment enum. And that’s it - SciChart will do everything else for you.

// Create X axis and position it to the left id<ISCIAxis> xAxis = [SCINumericAxis new]; xAxis.axisAlignment = SCIAxisAlignment_Left; // Create Y axis and position it to the top id<ISCIAxis> yAxis = [SCINumericAxis new]; yAxis.axisAlignment = SCIAxisAlignment_Top;
// Create X axis and position it to the left let xAxis = SCINumericAxis() xAxis.axisAlignment = .left // Create Y axis and position it to the top let yAxis = SCINumericAxis() yAxis.axisAlignment = .top
// Create X axis and position it to the left var xAxis = new SCINumericAxis { AxisAlignment = SCIAxisAlignment.Left }; // Create Y axis and position it to the top var yAxis = new SCINumericAxis { AxisAlignment = SCIAxisAlignment.Top };

Multiple axes support

Also, SciChart supports unlimited, multiple X or Y axes which can be aligned to the Right, Left, Top, Bottom sides of a chart. For more information - read Adding an Axis article. All that applies to Vertical(Rotated) Charts as well, so any reasonable combination of differently aligned axes is allowed. This allows to create mixed horizontal and vertical charts:

id<ISCIAxis> xAxis = [SCINumericAxis new]; xAxis.axisId = @“xAxis”; xAxis.axisTitle = @“Horizontal-X”; id<ISCIAxis> xLeftAxis = [SCINumericAxis new]; xLeftAxis.axisId = @“xLeftAxis”; xLeftAxis.axisAlignment = SCIAxisAlignment_Left; xLeftAxis.axisTitle = @“Vertical-X”; id<ISCIAxis> yAxis = [SCINumericAxis new]; yAxis.axisId = @“yAxis”; yAxis.axisTitle = @“Vertical-Y”; id<ISCIAxis> yTopAxis = [SCINumericAxis new]; yTopAxis.axisId = @“yTopAxis”; yTopAxis.axisAlignment = SCIAxisAlignment_Top; yTopAxis.axisTitle = @“Horizontal-Y”;
let xAxis = SCINumericAxis() xAxis.axisId = “xAxis” xAxis.axisTitle = “Horizontal-X” let xLeftAxis = SCINumericAxis() xLeftAxis.axisId = “xLeftAxis” xLeftAxis.axisAlignment = .left xLeftAxis.axisTitle = “Vertical-X” let yAxis = SCINumericAxis() yAxis.axisId = “yAxis” yAxis.axisTitle = “Vertical-Y” let yTopAxis = SCINumericAxis() yTopAxis.axisId = “yTopAxis” yTopAxis.axisAlignment = .top yTopAxis.axisTitle = “Horizontal-Y”
var xAxis = new SCINumericAxis(); xAxis.AxisId = “xAxis”; xAxis.AxisTitle = “Horizontal-X”; var xLeftAxis = new SCINumericAxis(); xLeftAxis.AxisId = “xLeftAxis”; xLeftAxis.AxisAlignment = SCIAxisAlignment.Left; xLeftAxis.AxisTitle = “Vertical-X”; var yAxis = new SCINumericAxis(); yAxis.AxisId = “yAxis”; yAxis.AxisTitle = “Vertical-Y”; var yTopAxis = new SCINumericAxis(); yTopAxis.AxisId = “yTopAxis”; yTopAxis.AxisAlignment = SCIAxisAlignment.Top; yTopAxis.AxisTitle = “Horizontal-Y”;

Horizontal and Vertical Chart

NOTE: Every RenderableSeries (chart types e.g. SCIFastLineRenderableSeries, SCIFastCandlestickRenderableSeries etc.), every Annotation and some Chart Modifiers (e.g. SCIPinchZoomModifier, SCIZoomPanModifier) requires to be measured against particular axis (in other words - attached to it). You must specify the Axis ID for them via the ISCIRenderableSeries.xAxisId and ISCIRenderableSeries.xAxisId properties.

However, If you have only a single X and Y Axis setting these ID properties isn’t required. This is required only for the multiple axis cases.