Use iOS-Charts How to set the label position of the X axis and the position of the bar, line

六月ゝ 毕业季﹏ 提交于 2019-12-25 18:59:12

问题


I want need to be done like this,

but I made this after I do not know how to do it.

I want understand the attributes of the IOS chart, the first picture on both sides of the column does not show completely, I would like to two columns and X axis of the label indentation, how to set up?

Can who help me? Thank you!


回答1:


If I understand your question, you want to see the whole width of the yellow bar for April. This should force the bar to be shown:

 chartView.xAxis.axisMinimum = 0.0
 chartView.setVisibleXRange(minXRange: 3.0, maxXRange: 3.0)

If you change the 0.0 to a bigger number it should move the yellow bar more to the right.

You can also try changing the number 3.0 to a bigger number and see what effect it gives you.



来源:https://stackoverflow.com/questions/44840461/use-ios-charts-how-to-set-the-label-position-of-the-x-axis-and-the-position-of-t

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!