简体   繁体   中英

Google Charts (Geochart) toggle region between World and Europe

is there a way to set a toggle option on the chart to switch the region between World and Europe

I googled like crazy and cant find anything. I know how to set the region just not toggle it.

Thanks C

Look at this: https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart

In the middle, you can see an example where they are zoomed on Italia and the surroundings. This could help you.

Use this for Europe:

var options = { region: '150' }

Just skip the Region parameter for the world.

You could use a toggle button from JQuery to call the function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM