在Highcharts中移动系列(Moving of series in Highcharts)

系统教程 行业动态 更新时间:2024-06-14 16:57:39
在Highcharts中移动系列(Moving of series in Highcharts)

我有jsFiddle考试 ,可以通过拖动黄线移动系列。 如果您在图形底部的某个刻度线前按鼠标按钮并将其移动到顶部,您将看到鼠标不再位于该刻度线的前面。 我想知道的是如何使系列和刻度完全按照鼠标。

同样在这段代码中我使用.update({min: ,max: }); 但它在Visual Studio中不起作用。 我怎样才能使它工作? 我不能使用.setExtremes(min,max); 因为它使我的应用程序非常慢。

非常感谢任何想法:)

I have jsFiddle examle where it's possible to move series by dragging of yellow line. If you will press mouse button in front of some tick in the bottom of the graphic and move it to the top, you will see that mouse is not in front of that tick any more. What I want to know is how to make series and ticks exactly follow the mouse.

Also in this code i use .update({min: ,max: }); but it doesn't work in Visual Studio. How can I make it work? I can't use .setExtremes(min,max); because it makes my application terribly slow.

Many thanks in advance for any ideas :)

最满意答案

检查一下: http : //jsfiddle.net/VXTeR/10/

固定步进功能:

var step = function(e) { line.translate(-40, e.pageY - clickY); var y1 = grafico.toValue(clickY), y2 = grafico.toValue(e.pageY); move = y1 - y2; grafico.setExtremes(-100 + move, 400 + move, true, false) }

Check this: http://jsfiddle.net/VXTeR/10/

Fixed step function:

var step = function(e) { line.translate(-40, e.pageY - clickY); var y1 = grafico.toValue(clickY), y2 = grafico.toValue(e.pageY); move = y1 - y2; grafico.setExtremes(-100 + move, 400 + move, true, false) }

更多推荐

本文发布于:2023-04-13 11:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/3a754a458a0fb138182d151dc6ef9d9c.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中移动   系列   Highcharts   Moving   series

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!