iPhone Core-plot: Chart Zoom In Zoom out, Y axis B

2019-02-24 17:27发布

I am now using Core-plot for iPhone chart Development. But it has some requirement i can not reach.

I am now using CorePlot 0.4, example code AAPLot to develop

Please have a look the following image, then you will know what is my problem Thank you very much...

I really need help for this problem, thank you

enter image description here

enter image description here

i want my result like this application

enter image description here

enter image description here

1条回答
迷人小祖宗
2楼-- · 2019-02-24 17:45

I see several questions here:

  1. Y-axis scale: Try the CPTAxisLabelingPolicyAutomatic labeling policy on your y-axis. If that doesn't give you enough control, use a different labeling policy and use a plot space delegate to adjust the labeling parameters as the user zooms in and out.

  2. Disappearing x-axis: Make it a "floating" axis. For example,

    x.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
    
  3. Maximum zoom level: Use the globalXRange and globalYRange plot space properties. If you need more control, you can use a plot space delegate.

  4. Scroll bars: This isn't directly supported. You could use a plot space delegate to update the scroll bar position.

查看更多
登录 后发表回答