I'm using HighchartsReact and I'm struggling to render my charts properly inside a simple tab implementation. Every time I change tabs, the charts get "stuck" on the previous rendering and never refresh. Here is the sample code. Thanks!
const chart1 = { "title": { "text": "Chart 1" }, xAxis: { type:'datetime' }, "series": [ { "name": "ONe line", "data": randData1 }, { "name": "Another LIne", "data": randData2 } ], chart: { events: { load: function(){} } } } const chart2 = { "title": { "text": "Chart 2" }, "series": [ { "name": "First Line", "data": randData3 }, { "name": "Second Line", "data": randData4 } ], chart: { events: { load: function(){} } } } const TheChart = ({ chartData }) => <HighchartsReact highcharts = { Highcharts } options = { chartData } /> const tabHeaders = [ 'Chart One', 'Chart Two' ]; const tabContent = [ <TheChart chartData={ chart1 } />, <TheChart chartData={ chart2 } /> ]; const tabsProps = { tabHeaders, tabContent }; ReactDOM.render(<Tabs { ...tabsProps } />, document.getElementById('root'));