Question

Is there a way to get a reference to the graph via the div id it was placed in?

new Dygraph(document.getElementById("chartxyz"),.....)

Since that wasnt stored to a var, (or even it if was, but i try to access it from another script)

is there a way i can get a dygraph object via that div id of chartxyz? I'd like to run the setSelection on it to highlight a series.

Thanks

Was it helpful?

Solution

No, you'll have to maintain the mapping yourself.

var dygraphs = {};
dygraphs['chartxyz'] = new Dygraph(document.getElementById("chartxyz"), .....)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top