轴线和轴标签之间的空间ios MPChart

时间:2018-03-13 06:42:49

标签: ios objective-c charts

在我在Objective-C的iOS应用程序中,我使用Charts库来实现图表,但我需要增加x轴线和标签之间的空间(在图像上用红线标记)如何增加它。  请帮忙。

enter image description here

1 个答案:

答案 0 :(得分:1)

对于上述XAxisleftAxis,您需要更改轴的offset属性,如下所示:

//For left Axis
lineChartView.leftAxis.xOffset = 20.0;

//For XAxis
lineChartView.xAxis.yOffset = 20.0;

通过这种方式,您可以在Axis中实现偏移。

使用20.0偏移值检查此图像:

enter image description here

希望这会有所帮助。

相关问题