It would be awesome if you could easily define with 
the Charts.newNumberRangeFilter and the Charts.newColumnChart() a way to 
pivot the output of discrete data.  
When using data like year and sales, the reports and filter selection 
becomes a mess.  I've read ways to go around it on this group, but for 
non-programmers like me the other options are not on the table.

Is there a features request area for visualization?

My code:

  function doGet() {
  // Open the form-attached spreadsheet by ID.
  // If the URL is 
https://docs.google.com/spreadsheet/ccc?key=0Aq4s9w_HxMs7dGVtVGtTVWVlLV9PbnM5elktTVRFSVE#gid=0,
  // the ID is 0Aq4s9w_HxMs7dGVtVGtTVWVlLV9PbnM5elktTVRFSVE
  var ss = 
SpreadsheetApp.openById('0AtVXWrF_nI6AdDJiMC1Xdi02U1liNUZUYmhjNHJLaEE');
 
  // Get the entire data range (all form entries).
  var data = ss.getDataRange();
 
  // Create various types of filter controls for the chart.
  var rankingFilter = 
Charts.newNumberRangeFilter().setFilterColumnIndex(5).build();
  var callqueueFilter = 
Charts.newCategoryFilter().setFilterColumnIndex(8).build();
  var buFilter = Charts.newCategoryFilter().setFilterColumnIndex(1).build();
  var shipFilter = Charts.newStringFilter().setFilterColumnIndex(3).build();
 
  // Create a table chart and look at only columns 0, 1, 2, 3, and 5.
  var tableChart = Charts.newTableChart()
    
.setDataViewDefinition(Charts.newDataViewDefinition().setColumns([0,1,2,3,5]))
    .build();
    
  // Create a table chart and look at only columns 1, and 5.
  var ColumnChart = Charts.newColumnChart()
    .setDataViewDefinition(Charts.newDataViewDefinition().setColumns([1,5]))
    .build();


  // Create a dashboard to bind the filters to the charts.
  var dashboard = Charts.newDashboardPanel().setDataTable(data)
  .bind([buFilter, callqueueFilter, rankingFilter, shipFilter], 
[tableChart, ColumnChart])
    .build();
 
  // Create a UiApp to display the dashboard in.
  var app = UiApp.createApplication();
  var chartPanel = app.createHorizontalPanel();
  var filterPanel = app.createHorizontalPanel();
  
filterPanel.add(buFilter).add(callqueueFilter).add(rankingFilter).add(shipFilter).setSpacing(10);
  chartPanel.add(ColumnChart).add(tableChart).setSpacing(10);
 
  dashboard.add(app.createVerticalPanel().add(filterPanel).add(chartPanel));
  app.add(dashboard);
  return app;

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to