仅在核心图条形图中允许水平滚动? [英] Allow horizontal scrolling only in the core-plot barchart?

查看:148
本文介绍了仅在核心图条形图中允许水平滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用core-plot lib在我的应用中绘制条形图,如

I am using core-plot lib to draw bar charts in my app like this

我的问题是我想要只启用grapgh运动水平方向,以便我可以看到很长一段时间的记录,但问题是我只是想保持y轴固定在它的位置,

My problem is that i want the enabling of grapgh movement only in horizontal direction so that I can see the records for a long period of time, But the problem is that i just wnt to keep the y axis fixed to its place,

如何我可以这样做吗?

等待帮助....

推荐答案

仅在最近才在Core Plot图中启用了基本的用户交互。要启用任何方向的滚动,您可以将绘图空间的 allowsUserInteraction 属性设置为YES。

Only recently has rudimentary user interaction been enabled in Core Plot graphs. To enable scrolling in any direction, you can set the allowsUserInteraction property of the plot space to YES.

我们目前无法将这种运动锁定在一个方向上。滚动操作发生在CPXYPlotSpace上的 -pointingDeviceDraggedAtPoint:方法中,因此您可以继承CPXYPlotSpace,复制其方法的实现,并将其更改为仅允许在X方向。更好的是,我们非常感谢任何扩展CPXYPlotSpace功能的贡献,以增加对单向移动的支持。

We currently have no means of locking that movement to one direction. The scrolling action takes place in the -pointingDeviceDraggedAtPoint: method on CPXYPlotSpace, so you could subclass CPXYPlotSpace, copy over its implementation of that method, and alter it to only allow movement in the X direction. Even better, we'd appreciate any contributions to extend the functionality of the CPXYPlotSpace to add support for unidirectional movement.

这篇关于仅在核心图条形图中允许水平滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆