How can I get the y-axis to be at a particular x-value in CorePlot?

后端 未结 1 1862
一向
一向 2021-01-24 01:36

I have the following bar graph. I want the y-axis to be present at x = 2005 (x range 2006-2012), however it seems to only want to show up when I change the x-axis range to 0-wha

相关标签:
1条回答
  • 2021-01-24 02:23

    There are two ways to control that:

    1. Set the orthogonalCoordinateDecimal property. For example,

      axisSet.yAxis.orthogonalCoordinateDecimal = CPTDecimalFromDouble(2005.0);
      
    2. Use constraints. For example,

      axisSet.yAxis.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
      
    0 讨论(0)
提交回复
热议问题