setView with objects doesn't seem to work.  I couldn't even get the
example in the setView documentation to work.

Am I missing something?  We've been trying to figure this out for hrs
now...

Code snippet to reproduce in the API playground below.


function drawVisualization() {
  // Create and populate the data table.
  var data = new google.visualization.DataTable();
  data.addColumn('string', 'Name');
  data.addColumn('number', 'Height');
  data.addColumn('boolean', 'Smokes');
  data.addRows(3);
  data.setCell(0, 0, 'Tong Ning mu');
  data.setCell(1, 0, 'Huang Ang fa');
  data.setCell(2, 0, 'Teng nu');
  data.setCell(0, 1, 174);
  data.setCell(1, 1, 523);
  data.setCell(2, 1, 86);
  data.setCell(0, 2, true);
  data.setCell(1, 2, false);
  data.setCell(2, 2, true);

  function myFunc(d,r){return d.getValue(r,0)}
  w = new google.visualization.ChartWrapper();
  v = new google.visualization.DataView(data);
  v.setColumns([2,
{calc:myFunc,type:'string','label':'testcol'}]);
  alert(v.toJSON()); //That doesn't look right!

  w.setChartType('Table');
  w.setDataTable(data);
  w.setView(v.toJSON());
  w.setContainerId('table');
  w.draw();

}




-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to