问题
I'm building a Google Visualization DataTable. You can see it here:
http://jsfiddle.net/MmyKU/4/
I've built out my United States color coding, but I need to add plots of about 8 US Cities on top of the color coding. I can't find any documentation or other examples online that specifies if/how this is possible. I've taken a few stabs at it with no results.
I'm just trying to:
1) Verify if it's possible?
2) Find a working example or have some help adding a second table to a single drawVisualization instance!
Thanks!
回答1:
https://developers.google.com/chart/interactive/docs/gallery/geochart#Configuration_Options
add to your options
displayMode: 'markers',
回答2:
Regions and Markers wont work at the same time. SO if you want to color the background of the states, using markers mode, you can do it with CSS.
I'm documenting some examples for a Wordpress plugin i developed here: http://cmoreira.net/interactive-world-maps-demo/advanced-customization/
Check the last example. It's not easy, since you have to find which child path number you want to color, and then you can do it. Example:
#visualization path:nth-child(5) {
fill:#cccccc;
}
Here's a forked example, of your code with the CSS above: http://jsfiddle.net/cmoreira/Jqkjg/
Hope it helps!
来源:https://stackoverflow.com/questions/10644798/google-visualization-can-you-code-u-s-province-level-data-and-some-city-plots