I'm trying to shift the x-axis labels upwards. Is there a property that I can set to do that? I've tried adding some bottom padding to the plot frame, but all that does is to squeeze the entire plot upwards.
Another question answered on Stack Overflow led me to change 'orthogonalCoordinateDecimal'. For instance:
axisSet.xAxis.orthogonalCoordinateDecimal = CPTDecimalFromString(@"0")
This caused my X-axis to pass through the origin. To raise my X-axis in relation to my graph, I changed the value to '25000', as in:
axisSet.xAxis.orthogonalCoordinateDecimal = CPTDecimalFromString(@"25000")
On thing to be mindful of is scale. My values in this case ranged from 0 - 185,000 so a shift of 25,000 is approximately equivalent to a shift of 4 when the upper value of the axis is 30 (days in my case, just for example). I was originally trying to shift the 0-185,000 axis by 5.0, and wondering why it had no effect, thinking it was a measurement of screen real estate instead of a scaled value.
The property your looking for is axisSet.xAxis.labelOffset
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With