for react projects
import Highcharts from 'highcharts'
inside your react component function add
useEffect(() => {
// Reset all Highcharts charts' zoom
if (Highcharts.charts) {
Highcharts.charts.forEach((chart) => {
if (chart) {
chart.zoomOut()
}
})
}
}, [condition1, condition2])
in this situation i have 2 conditions where i want the chart to reset the zoom add your state vars in the useEffect dependency array