我有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) }更多推荐
发布评论