title: Charts and Object Type Error
body: <p>New to the Chart Service and was hoping to elaborate more on this post <a href="https://stackoverflow.com/questions/14132295/google-charts-object-error">Google charts object error</a></p>
  
  <p>I'm running into the same "object type does not match column type"  problem, but I've checked the rows and made sure the data was the same type.  If I set the whole sheet as format plain text, the graphs execute correctly and no errors; but I loose all the filters and functions that use dates of flights or try to sum flight time, and count flight types on other sheets in the workbook.  </p>
  
  <p>Is there a way to have the charts string the column data before using it? (simply).  I even set the data range to not include the string headers just in case that was the issue, that didn't work either.</p>
  
  <p>Link to sample data sheet:<a href="https://docs.google.com/spreadsheet/ccc?key=0AvmOEVr803HMdGNLXzBxNVYwTFAwZjRwYWlPWm5oYUE#gid=0" rel="nofollow noreferrer">Sample Data Sheet</a></p>
  
  <p>Here is the code:  </p>
  
  <pre><code>      function doGet(){
      //Get the data from spreadsheet
      var ss = SpreadsheetApp.openById(ScriptProperties.getProperty('hoistLog'));
      var sheet = ss.getSheetByName('Flight Tracking');
      var data = sheet.getDataRange();
  
      //Filters
      var unitFilter = Charts.newCategoryFilter()
      .setFilterColumnIndex(22)
      .build();
  
      var missionTypeFilter = Charts.newCategoryFilter()
      .setFilterColumnIndex(2)
      .build();
  
      //Charts
      var missionTypePieChart = Charts.newPieChart()
      .setDataViewDefinition(Charts.newDataViewDefinition().setColumns([2]))
      .setDimensions(550, 350)
      .setTitle('Mission Types')
      .set3D()
      .build();
  
      var unitTypePieChart = Charts.newPieChart()
      .setDataViewDefinition(Charts.newDataViewDefinition().setColumns([22]))
      .setDimensions(550, 350)
      .setTitle('Flights By Unit')
      .set3D()
      .build();
  
      var tableChart = Charts.newTableChart()
      .setDataViewDefinition(Charts.newDataViewDefinition().setColumns([0, 2, 22, 23, 24, 25,     33, 34, 35, 36, 37]))
      .setDimensions(1100, 500)
      .build();
  
      //Dasboard
      var dashboard = Charts.newDashboardPanel().setDataTable(data)
      .bind([unitFilter, missionTypeFilter], [missionTypePieChart, unitTypePieChart,   tableChart])
      .build();
  
      var app = UiApp.createApplication();
      var filterPanel = app.createHorizontalPanel();
      var chartPanel = app.createHorizontalPanel();
      var tablePanel = app.createVerticalPanel();
      filterPanel.add(unitFilter).add(missionTypeFilter).setSpacing(10);
      chartPanel.add(missionTypePieChart).add(unitTypePieChart).setSpacing(10);
      tablePanel.add(tableChart).setSpacing(10);
  
                          dashboard.add(app.createVerticalPanel().add(filterPanel).add(chartPanel).add(tablePanel));
      app.add(dashboard);
      return app;  
     }
  </code></pre>
  
  <p>Thanks Ahead of time...</p>