You can specify the "formatted" value for each province, as you can
see in this example:  http://jsfiddle.net/dlaliberte/SSCLx/6/

To do so, you have to create your datatable using the addColumn() and
addRows() mechanism, like this:

    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Province');
    data.addColumn('number', 'Popularity');

    data.addRows([
                [{v:"CN-11", f:"province 11"}, 600],
                [{v:"CN-50", f:"province 50"}, 595],
                [{v:"CN-31", f:"province 31"}, 700],
                [{v:"CN-53", f:"province 53"}, 500]
            ]);


On Fri, Oct 5, 2012 at 4:23 AM, UI <[email protected]> wrote:
> Can I rename a GEO-CODE manually.  I do not want the label to be a number.
> In this case I am mapping regions in China and only the codes function.
> Goal is to rename the code to the actual province name.
>
> Thanks
>
> _______________
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
>   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
>   <title>Google Visualization API Sample</title>
>   <script type="text/javascript" src="http://www.google.com/jsapi";></script>
>   <script type="text/javascript">
>     google.load('visualization', '1', {packages: ['geochart']});
>
>     function drawVisualization() {
>       var data = google.visualization.arrayToDataTable([
>         ['Provinces', 'Popularity'],
>         ['CN-11', 600],
>         ['CN-50', 595],
>         ['CN-31', 700],
>         ['CN-53', 500]
>       ]);
>
>       var geochart = new google.visualization.GeoChart(
>           document.getElementById('visualization'));
>       geochart.draw(data, {width: 556, height: 347, region:"CN",
> resolution:"provinces"});
>     }
>
>     google.setOnLoadCallback(drawVisualization);
>   </script>
> </head>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Chart API" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-chart-api/-/qNr3iQY87soJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-chart-api?hl=en.



-- 
Daniel LaLiberte  - 978-394-1058
[email protected]   562D 5CC, Cambridge MA
[email protected] 9 Juniper Ridge Road, Acton MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to