Category / Section
How to inverse the chart axis in iOS Chart?
1 min read
SFChart provides support to inverse the chart axis. Chart axis has a Boolean property called isInversed is used to inverse the axes.
The following code illustrates how to use the isInversed property.
Objective-C
SFNumericalAxis *axis = [[SFNumericalAxis alloc]init]; axis.isInversed = true; chart.primaryAxis = axis;
Swift
var axis : SFNumericalAxis = SFNumericalAxis(); axis.isInversed = true; chart.primaryAxis = axis;
Xamarin.iOS (C#)
SFNumericalAxis axis = new SFNumericalAxis();axis.IsInversed = true;chart.PrimaryAxis = axis;