79398440

Date: 2025-01-29 23:35:20
Score: 0.5
Natty:
Report link

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

Reasons:
  • RegEx Blacklisted phrase (1): i want
  • Has code block (-0.5):
Posted by: JesseBoyd