Skip to content

Instantly share code, notes, and snippets.

View dougdenn's full-sized avatar

Doug Denniston dougdenn

  • Philly ♥️
View GitHub Profile
@dougdenn
dougdenn / example.tsx
Last active January 11, 2021 21:17
Resizable React-Plotly
function rescalePlot(plotDivId: string) {
let plotDiv = document.getElementById(plotDivId);
plotDiv.dispatchEvent(new Event('resize'))
}
//--inside your render function--
<ResizeSensor onResize={() => rescalePlot(plotDivId)}>
<Plot
divId={plotDivId}