faheem801 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Crosshair problem with two independent flots #440

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have problems synchronizing the crosshair.x position in two independent 
plots, that have different widths.  As far as I could see, crosshair is 
declared as a global Var. Do I have to hack into the crosshair plugin, or there 
is an easier way.

context: both plots are set to - xaxis: {mode: "time"}.  There is a main plot 
to navigate across time (displaying its crosshair with the mouseover) and 
secondary plot that should sync its crosshair.x to the moves on the main plot.  
What I get is that the crosshair.x of the secondary plot is equal to that of 
the main plot (which is not the intention, its not the X that needs to be the 
same, but the "X-time")

Many thanks

Original issue reported on code.google.com by tolchin...@gmail.com on 30 Nov 2010 at 11:49

GoogleCodeExporter commented 9 years ago
Hi!

I reckon you may have found out what your problem was already, but I just 
tested having two independent plots, and it seems to be working fine. The 
crosshair.x position is declared inside a closure over the plot object so 
should certainly be specific to each plot. I think that maybe your 
synchronizing code has a bug?

To answer your first question, you should use setCrosshair and combine it with 
hover events, there's a little example in the comment at the top of the file.

If you do need more help, I suggest you try the forum/mailing list. Remember to 
post some code so people can see what's wrong. I'm going to close this issue 
now. If you have in fact found a bug in Flot, please reopen.

Original comment by olau%iol...@gtempaccount.com on 11 Mar 2011 at 1:01

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 4 Jun 2012 at 2:52