I have implemented Highcharts to showcase a set of data through different types of charts - Area chart, Line chart, and Bar chart. By default, the page loads with the Area chart displayed. Upon clicking a button, I switch to displaying the Line chart and then the Bar chart. Interestingly, whenever I change the chart type using a button click, the width of the chart increases by exactly 25px.
Is there a way in Highcharts to re-render the graph? I believe that by re-rendering it, I may be able to resolve this issue. Currently, I am resorting to using a timeout approach to clear and re-render the DOM which is not an ideal solution. If there exists a re-render method in Highcharts, I would greatly appreciate it if you could provide some insight on how to utilize it.