Bassa Safa
unread,Jun 2, 2012, 11:44:03 AM6/2/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 Visualization API
Hi all,
I'm trying to initialize a LineChart with JSON-data. However one of
the data-cell has an abnormal high value... its 1.7976931348623157
E308. This browser is unable to process and format the data and after
a while firefox ask me if I would like to stop the script. Now to my
questions. Does LineChart have a maximum number for a number column?
Or is it the javascript language that sets up the limitations? How
could I denote that the maximum number should be used? Is there a way
to denote that the infinite number should be used?
my code:
var formatterPercent = new google.visualization.NumberFormat({pattern:
'##.##%'});
var formatterDate = new google.visualization.DateFormat({pattern:
'yyyy-MM-dd'});
var grundJsonData2 = <h:outputText value="#{historiskanalys.json}"
escape="false"/>;
var data2 = new google.visualization.DataTable(grundJsonData2);
formatterDate.format(data2, 0);
formatterPercent.format(data2, 1);
formatterPercent.format(data2, 2);
var chartLineChart2 = new google.visualization.ChartWrapper({
'chartType': 'LineChart',
'containerId': 'chart_div3',
'options': {
title: 'Company Performance previous year',
vAxis: {format: '##.##%', maxValue: 1, minValue: -1},
legend: {position: 'bottom'},
pointSize: 1
}
});
chartLineChart2.setDataTable(data2);
chartLineChart2.draw();
Thank you for your time.
best regards
bassa