max237
Posts: 1
Joined: Thu Aug 13, 2020 6:26 pm

Can not find mapZoom() method, using highcharts-react-official

Hi! I'm using highcharts-react-official and I need to call mapZoom() on load. According to docs, I can get the chart instance using ref. I console.logged chartRef.current.chart, went through all properties and methods and couldn't find it. I'm using functional component with hooks btw. Where do I find mapZoom()? Thanks a lot!
mateuszkornecki
Posts: 1222
Joined: Mon Oct 28, 2019 10:29 am

Re: Can not find mapZoom() method, using highcharts-react-official

Hello,

Welcome to our forum and thanks for contacting us with your question!

The method that you are looking for is available from the chart object so calling "chartRef.current.chart.mapZoom()" should work. I bet that you didn't find it because it is hidden in the chart's prototype.

Let me know if you have any further questions!

Best regards.
Mateusz Kornecki
Highcharts Developer

Return to “Highcharts Maps”