Implementing Linechart With Datasource Request

Discussion in 'Google API' started by RPJD, Jan 29, 2013.

  1. #1
    I'm completely new to api's.
    I want to implement a Dashboard in WordPress using Google Visualization API.
    I installed and activated the Google Visualization Chart plugin. I was using the LineChart API in the Google Code Playground, changed some data and produce a nice line chart. However, I want to collect the data I manually entered from a Google sheet.
    How do I make a sheet on a Google Drive accessible to the API plugin?
    I need to merge the code from the LineChart API with the Data Source Request API.
    I have this code:
    var data = response.getDataTable();
      new google.visualization.LineChart(document.getElementById('dashboard')).
          draw(data, {curveType: "function",
                      width: 500, height: 400,
                      vAxis: {maxValue: 10}}
              );
    Code (markup):
    and getting this error:
    TypeError: google.visualization.LineChart is not a constructor.....
    Can someone advise on what I'm doing wrong?
    Grateful for any help with this.
     
    RPJD, Jan 29, 2013 IP