NA
unread,May 10, 2012, 5:26:18 PM5/10/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-visua...@googlegroups.com
Is it possible to use a NumberFormatter and BarFormatter at the same time on a table whose underlying DataTable will be updated?
I am able to render a Table with both a numberformatter and barformatter applied to the same column. That looks fine.
But when I change the values, the last formatter applied is the only one that shows the correct values; the previous formatter shows the previous values. I've even tried removing all formatters, applying one formatter, forcing a redraw, then applying another formatter and again forcing a redraw. But the first formatter's values are always unchanged while the second formatter has the right values.
This is especially frustrating because in the initial rendering, the column is formatted correctly by both formatters.
I feel like I've asked this before or seen a similar thread, but searching this group didn't turn anything up.
Any ideas?
Pseudo code looks like:
// weightsTable is a DataTable
// weightsDisplay is a ChartWrapper
// numberFormatter and barFormatter are formatters
for {
weightsTable.setValue(i,2,weight);
weightsTable.setFormattedValue(i,2,null);
}
numberFormatter.format(weightsTable,2);
barFormatter.format(weightsTable,2);
weightsDisplay.draw();
The first time this code is run, everything looks great. But when the code is called again (the table has already been rendered), I get the buggy behavior.
I might resort to just deleting the entire table, though that's not a very satisfying workaround...
thanks for any ideas,