bcliang / dash-extendable-graph

Graphing component for Dash. Forked from the core Graph component, with modified extend/prepend properties to accept data formats matching `figure["data"]`
MIT License
10 stars 0 forks source link

Plotly functions fail within clientside callbacks #41

Closed bcliang closed 4 years ago

bcliang commented 4 years ago

For users using clientside callbacks to trigger changes to the dash-extendable-graph Figure, the current code in master will fail.

Cause: To mimic the responsive behavior of the core Graph component, the plotly.js figure has been moved inside a parent div to support the use of react-resize-detector. Because the component ID is tied to the outer div, calls using the plotly.js library fail (e.g. Plotly.relayout('my-extendable-graph-id', {layout object..});

Solution: Need to move the key / id declarations into the child div.

Additional: Add new integration test to make sure this doesn't break moving forward.