Hi,
It took me a long time to finally that my values would not get updated on my table even though the underlying data table was changed because of formatters.
I might be doing something wrong but it sure looks like there is an issue. See following code to run in Google Code Playground (modified Table example):
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Name', 'Height', 'Smokes'],
['Tong Ning mu', 174, true],
['Huang Ang fa', 523, false],
['Teng nu', 86, true]
]);
var formatter_percentage = new google.visualization.NumberFormat({suffix:'%'});
formatter_percentage.format(data, 1);
// Create and draw the visualization.
var table= new google.visualization.Table(document.getElementById('table'));
var tableView = new google.visualization.DataView(data);
table.draw(tableView, {showRowNumber: false});
data.setValue(0,1,200);
table.draw(tableView, {showRowNumber: false});
}
If we leave as is, the value in row 0, column 1 will never show as 200 in the table. If we comment ou the two formatter lines, it works.
Any ideas why?
Am I using the formatters in a bad way? Is there a work around (other than me formatting the values through custom code)?
Many thanks.