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

安稳与你 提交于 2019-12-20 01:39:05

问题


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

i want my result like this application


回答1:


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.



来源:https://stackoverflow.com/questions/7819472/iphone-core-plot-chart-zoom-in-zoom-out-y-axis-bigger-y-axis-smaller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!