简体   繁体   English

Google图表(Geochart)在世界和欧洲之间切换区域

[英]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 有没有办法在图表上设置切换选项以在WorldEurope之间切换区域

I googled like crazy and cant find anything. 我疯狂地搜寻着,找不到任何东西。 I know how to set the region just not toggle it. 我知道如何设置区域只是不切换它。

Thanks C 谢谢C

Look at this: https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart 看看这个: 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. 在中间,您可以看到一个示例,其中将它们放大到Italia及其周围。 This could help you. 这可以为您提供帮助。

Use this for Europe: 将此用于欧洲:

var options = { region: '150' }

Just skip the Region parameter for the world. 只需跳过世界的Region参数。

You could use a toggle button from JQuery to call the function. 您可以使用JQuery中的切换按钮来调用该函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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