import ReactPlotlyEditor from 'react-chart-editor' import React, { createRef } from 'react' import EditorControls from 'react-chart-editor/lib/EditorControls' /** * This extended ReactPlotlyEditor has a reference to PlotComponent. * The reference makes it possible to call updatePlotly method of PlotComponent. * updatePlotly method allows smoothly resize the plot * when resize chart editor container. */ export default class ReactPlotlyEditorWithPlotRef extends ReactPlotlyEditor { constructor(props) { super(props) this.plotComponentRef = createRef() } render() { return (