Hi!

I use Google Analytics Embed API to show chart with analytics data.
I can get the chart to show countries in a filled color. 
But my aim is to show data for a specific country (Sweden) and display the 
regions where people have been visiting the site.
But if I set it to a region (Sweden) and set it to "resolution: 'provinces' 
", no region is filled with a color.

Here is the way I specify the data and the chart:

var location = new gapi.analytics.googleCharts.DataChart({

    query: {

        'ids': viewId,

        'start-date': '90daysAgo',

       'end-date': 'today',

       'metrics': 'ga:users',

       'sort': '-ga:users',

       'dimensions': 'ga:region', 

       'max-results': 10

    },

   chart: {

      'container': 'location',

      'type': 'GEO',

      'options': { 

      region: 'SE',

      resolution: 'provinces' 

   }

}

});


Since I specify "ga:region" in the query, I get regional data back 
correctly in this form:


"dataTable": {
        "cols": [
            {
                "id": "ga:region",
                "label": "ga:region",
                "type": "string"
            },
            {
                "id": "ga:users",
                "label": "ga:users",
                "type": "number"
            }
        ],
        "rows": [
            {
                "c": [
                    {
                        "v": "Stockholm County"
                    },
                    {
                        "v": "15"
                    }
                ]
            },
            {
                "c": [
                    {
                        "v": "Vastra Gotaland County"
                    },
                    {
                        "v": "6"
                    }
                ]
            },


Is this data sufficient and correct to be able to show regional data for a 
certain country?






-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/67646551-1d3e-4925-9d49-9ecb1a6cc055%40googlegroups.com.

Reply via email to