Reputation: 626
I have two graphs say Graph A and Graph B, Both have same x-axis values i.e date. So when a user zoom on graph A, is it possible to zoom (re-plot) graph B with the selected zoom range value on graph A
Note: Zooming is done by selection
Upvotes: 0
Views: 756
Reputation: 21226
Absolutely, and in fact that exact example is shown on the example page for flot.
Check out the source of that example to see the details of how it works. Essentially, you bind the plotselected
events on both graph A and graph B, and call the plot.setSelection(range)
function for the opposite graph in each. There are more details, but again, it's all in the source there.
Upvotes: 1