So, as you can see I'm trying to reflow Highcharts in order to keep the right width according to it's parent container, in order to do that I'm listening to the sidebar state and calling reflow whenever the state is changed.
useEffect(() => {
Highcharts.charts[0].reflow();
}, [collapseSideBar]);
This is my Highcharts component:
<div className="text-black-50 col-span-2 row-span-2 bg-white rounded-lg shadow-xl h-100 w-100">
<HighchartsReact highcharts={Highcharts} options={a11Options} />
</div>
