jqPlot游标跟随系列行 [英] jqPlot Cursor follow series line

查看:63
本文介绍了jqPlot游标跟随系列行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用jqPlot的折线图,该折线图带有一个序列以及跨它的多个数据点和平滑的线.我正在使用Cursor插件显示十字准线,并使用工具提示显示x和y点.

I have a line graph using jqPlot with one series and several data points across it and smoothed lines. I'm using the Cursor plugin to show crosshairs and a tooltip to show x and y points.

有可能让十字准线跟随系列中的线吗?因此,水平线将固定在该线的y位置,而不跟随鼠标.我看到您可以获得每个数据点的x/y位置,但不能获得这些点之间的线.

Is it possible to have the cross hairs follow the line on the series? So the horizontal line would fix to the y position of the line and not following the mouse. I see you can get the x/y position of each data point but not of the lines inbetween points.

谢谢

推荐答案

如果使用内置的平滑选项,则平滑的数据点存储在以下位置:

If you are using the built in smoothing options the smoothed data points are stored at:

plotObj.series[0].renderer._smoothedPlotData

其像素位置位于:

plotObj.series[0].renderer._smoothedData

这篇关于jqPlot游标跟随系列行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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