Consider the following - the id of the column being grouped needs to
be preserved. It looks like it's being lost.

There's no reason it shouldn't be kept the same as the id of the
original table by default.  It looks like the only way to keep it is
to specify an array of objects for the keys input, instead of just an
array of columns?

  var data = new google.visualization.DataTable();
  data.addColumn('string', 'Name','name');
  data.addColumn('number', 'Height','height');
  data.addColumn('boolean', 'Smokes','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);

  dataG = new google.visualization.data.group(data,[0],[{column:
1,'aggregation': google.visualization.data.sum, 'type': 'number'}]);
  alert(data.getColumnId(1));
  alert(dataG.getColumnId(1));

-- 
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