I am trying to tweak my plots with JS similar to https://stackoverflow.com/a/47704082. To do that I need to access the actual plot instance (the <div>
node) of dcc.Graph. I tried
var plot = document.querySelector("#graph-id .plotly");
but this does not seem to work, as the returned element does not have Plotly-specific methods such as .on()
or .data
. Does anyone know if this is possible?