Moose
Moose

Reputation: 1317

Google Embed API Chart Types?

I am trying to use the Embed API to make a custom dashboard from my Google Analytics account.

Below, you will see the code that is used to render the chart on the screen. Inside of the chart object, there is a property called type which is set to LINE in the example below.

Where can I find a list of these values? It's really annoying having to arbitrarily guess what the string values are. The documentation doesn't show what the possible values are or how many there are.

I tried going to the Goolge Charts page and look for a list, but I couldn't find it either. Any help is appreciated.

var dataChart = new gapi.analytics.googleCharts.DataChart({
    query: {
      metrics: 'ga:sessions,ga:uniquePageviews',
      dimensions: 'ga:date',
      'start-date': '10daysAgo',
      'end-date': 'yesterday'
    },
    chart: {
      container: 'chart-container',
      type: 'LINE',
      options: {
        width: '100%'
      }
    }
  });

Upvotes: 1

Views: 2240

Answers (2)

cipher442
cipher442

Reputation: 41

There is an additional chart type of PIE. This is not mentioned in the official documentation. Here is a demo of the PIE type.

Upvotes: 2

dikesh
dikesh

Reputation: 3125

You can check Built-in Components Reference of Embed API and checkout the Datachart Options.

Following are the chart types:

  • LINE
  • COLUMN
  • BAR
  • TABLE
  • GEO

Upvotes: 3

Related Questions