I have been trying to figure out the proper code for this via Stackoverflow examples but nothing is working for me and I'm fairly new to coding in Javascript. Please take a look at the example I created in jsfiddle.net below:
https://jsfiddle.net/patriciob/jarkLt6z/
I want to be able to zoom in to a country using the "id" of that country but the code I found online doesn't really work, I want to modify the following section of the code:
Code: Select all
//Zoom to the point that equals the country id after the user has clicked on the country in the spreadsheet
setTimeout(function() {
chart.update({
series: [{
data: data,
}]
}, true, false, false);
if (params[5]) {
chart.get(params[5]).zoomTo();
chart.mapZoom(0.125);
console.log();
}
}, 1000);
At this point being able to Zoom in on a particular country would allow me to set up a link in a Jedox report so when a person clicks a country's name in the spreadsheet the link would update the widget and the Highcharts map would zoom in to the correct country.
Any JavaScript-based examples you can send my way would be greatly appreciated.
My Very Best,
Patrick B.