Formatting of Extrapolated Values on MotionChart

12 views
Skip to first unread message

Arnold

unread,
Jul 3, 2009, 3:33:51 AM7/3/09
to Google Visualization API
Extrapolated values on MotionChart can have values with many decimal
places, and MotionChart seems to display them as they are. For example
you could see "11.273737 Million" or "33.003386 Billion".

Using the code bellow in MotionChart at AJAX Playground,
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(2);
data.addColumn('string', 'Fruit');
data.addColumn('date', 'Date');
data.addColumn('number', 'Sales');
data.addColumn('number', 'Expenses');
data.addColumn('string', 'Location');
data.setValue(0, 0, 'Apples');
data.setValue(0, 1, new Date (1988,0,1));
data.setValue(0, 2, 10000000);
data.setValue(0, 3, 300);
data.setValue(0, 4, 'East');

data.setValue(1, 0, 'Apples');
data.setValue(1, 1, new Date(1988,1,1));
data.setValue(1, 2, 12000000);
data.setValue(1, 3, 400);
data.setValue(1, 4, "East");

var motionchart = new google.visualization.MotionChart(
document.getElementById('visualization'));
motionchart.draw(data, {'width': 800, 'height': 400});
}

the user sees values such as 10.967762 Billion as a value of Expenses.
Currencies are usually in 2 decimal places. Although this does not
kill someone, it kind of doesn't look nice.

I understand that you cannot control formatting on the MotionChart,
but It would be nice if the numbers were rounded up more "nicely" when
displayed to the user; or that there was some control on the rounding.

Will this be an unreasonable (feature) request?

Arnold.

ChartMan

unread,
Jul 5, 2009, 3:33:40 AM7/5/09
to google-visua...@googlegroups.com
Hi

Thanks for this comment.
I will add to our feature request to better format interpolated values or allow the user to control the formatting.

ChartMan

Arnold

unread,
Jul 5, 2009, 7:27:36 AM7/5/09
to Google Visualization API
Thank you.

On Jul 5, 10:33 am, ChartMan <chart...@google.com> wrote:
> Hi
>
> Thanks for this comment.
> I will add to our feature request to better format interpolated values or
> allow the user to control the formatting.
>
> ChartMan
>
Reply all
Reply to author
Forward
0 new messages