Search code examples
iosiphoneios-charts

iOS-charts won't put the x-axis at zero on the y-axis


I can not get an iOS-charts bar chart to put the bars zero (the bottom of the bars) on the x-axis. They seem to float just above the x-axis:

enter image description here

The bars in orange are set to 100 which is the max height of the y-axis for illustration. The only thing that might be doing it is at about 3PM there is a blank space.

I have rightAxis.axisMinValue = 0 set.


Solution

  • In your sample project, you forgot to set dataSet.axisDependency = .Right