Hey,
Is there a way to avoid gauge chart losing numberFormat while the
value is updated with motion?
Here is an example:
function drawGauge() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Label');
data.addColumn('number', 'Value');
data.addRows(1);
data.setValue(0, 0, 'Above 7');
data.setValue(0, 1, 0);
var formatter = new
google.visualization.NumberFormat({fractionDigits: 0,suffix: '%'});
formatter.format(data, 1);
var above7Gauge = new
google.visualization.Gauge(document.getElementById('above7Gauge'));
var options = {width: 100, height: 100, redColor:
'#ee9f00',
yellowColor: '#eeee00', greenColor: '#9fee00', redFrom: 0, redTo: 30,
yellowFrom: 30, yellowTo: 70, greenFrom: 70, greenTo: 100, minorTicks:
5};
above7Gauge.draw(data, options);
setInterval(function(){
formatter.format(data, 1);
data.setValue(0, 1, ".
$keywords_o_meter[1] .");
above7Gauge.draw(data, options);
}, 1000);
}
--
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.