iOS Charting Documentation - SciChart iOS Charts SDK v3.x

Axis Ranging - Get or Set VisibleRange

How to modify VisibleRange for different Axis Types

To programmatically range an axis, set the property ISCIAxisCore.visibleRange.

NOTE: The type of object that needs to be applied to the Axis VisibleRange depends on the axis type.

For more information about setting VisibleRange on particular Axis type - please see the following:

Adding Padding or Spacing with GrowBy

Also, it is possible to add spacing to the VisibleRange via the ISCIAxisCore.growBy property. It allows to specify two fractions which will be always applied to the ISCIRange.min, ISCIRange.max values of the axes VisibleRange:

id<ISCIAxis> axis = [SCINumericAxis new]; axis.growBy = [[SCIDoubleRange alloc] initWithMin:0.1 max:0.1]; axis.visibleRange = [[SCIDoubleRange alloc] initWithMin:0 max:10];
let axis = SCINumericAxis() axis.growBy = SCIDoubleRange(min: 0.1, max: 0.1) axis.visibleRange = SCIDoubleRange(min: 0, max: 10)
var axis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1), VisibleRange = new SCIDoubleRange(0, 10) };

In the code snippet above, the GrowBy of 0.1 will be applied to the VisibleRange resulting in actual VisibleRange increased by a fraction of 0.1 (10%), i.e. Min = -1, Max = 11.

GrowBy

Zooming to fit all the Data

Sometimes it is required to make an axis to show the full extent of the data associated with it. There are several ways to achieve this in code:

To change the VisibleRange by touch interaction with a chart, please read about our ChartModifier API.