问题
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