在 Zedgraph 中检测鼠标悬停线
我尝试检测鼠标何时位于 zedgraph 中的曲线上,如果鼠标位于曲线的某个点上,我能够做到这一点,但问题是当曲线在该区域没有点时,
让我向您展示一个示例:
曲线由 2 个点定义: [X=0;Y=10] -- [X=1000;Y=10]
如果鼠标位于点 [X=500;Y=10],则它位于曲线上方,但是没有超过任何一点,所以我无法检测到它。
当鼠标位于线上但不一定位于点上时是否会触发任何事件?
谢谢
I try to detect when the mouse is over a curve in zedgraph, I am capable of doing it if the mouse is over a point of the curve, but the problem is when the curve has no points in that region,
let me show you an example:
Curve is defined by 2 points: [X=0;Y=10] -- [X=1000;Y=10]
If mouse is at point [X=500;Y=10] it is over the curve, but not over any point so i cannot detect it.
Is there any event which gets fired when mouse is over line but not necessarily over a point?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,这必须通过手动插值来完成。查看发布到我的类似问题的答案,其中显示了 FindNearestCurve 函数的示例(我还没有测试过)
https ://stackoverflow.com/a/5885812/445533
(尽管有 FindNearestObject 适用于 LineObj,如这些答案中所述)
No, this must be done by manual interpolation. See answers posted to my similar question, showing an example of a FindNearestCurve function (I have not tested it)
https://stackoverflow.com/a/5885812/445533
(There is FindNearestObject which works for LineObj though, as detailed in those answers)