I am linking 4 graphs together in Dygraphs. It all works fine. When I mouse over one graph, I see the readout for all 4 graphs which is what I want.
However, when I zoom in to one graph, they all zoom in, but the legends are not displaying except for the one I am hovering over.
Also, when I zoom back out (double click ) it only shows one legend at a time. And it is the graph that I had zoomed-in on, regardless of where my mouse is now.
I am using a double click plugin as shown.
const doubleClickZoomOutPlugin = {
activate: function (g) {
// Save the initial y-axis range for later.
const initialValueRange = g.getOption('valueRange');
return {
dblclick: e => {
e.dygraph.updateOptions({
dateWindow: null, // zoom all the way out
valueRange: initialValueRange // zoom to a specific y-axis range.
});
e.preventDefault(); // prevent the default zoom out action.
}
}
}
}
How can I adjust this plugin this to show all 4 legends whenever I mouse over one of them. In other words, to reset the legend draw functionality.
Thanks!