Hi,

Is there a way to use chartwrapper without declaring a datatable
object to use the formated text view?

say i want this as the data table:
var data = [['name','rate1','rate2'],
  ['Shoes', {v:.12, f:'12.0%'}, {v:.12, f:'12.0%'}],
  ['Toys', {v:0, f:'0%'},{v:.12, f:'12.0%'}],
  ['Electronics', {v:.21, f:'21%'},{v:.12, f:'12.0%'}],
  ['Food', {v:.22, f:'22%'},{v:.12, f:'12.0%'}]
];

var wrapper = new google.visualization.ChartWrapper({
  chartType: 'ColumnChart',
  dataTable: data,
  options: {title: 'Test'},
  containerId: 'visualization'
});

wrapper.draw();

This is not working working because it is throwing an error for the
{v...f} object.

As a workaround i need to create a DataTable:

var data = new google.visualization.DataTable();
data.addColumn('string', 'Month');
data.addColumn('number', 'Rate');
data.addColumn('number', 'Rat3');

data.addRows([
  ['Shoes', {v:.12, f:'12.0%'}, {v:.12, f:'12.0%'}],
  ['Toys', {v:0, f:'0%'},{v:.12, f:'12.0%'}],
  ['Electronics', {v:.21, f:'21%'},{v:.12, f:'12.0%'}],
  ['Food', {v:.22, f:'22%'},{v:.12, f:'12.0%'}]
]);

Is it possible to avoid this in the ChartWrapper class?

thanks

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