Hey!

Is there a way to avoid gauge chart losing numberFormat while it's
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, 'Google');
        data.setValue(0, 1, 0);

        var formatter = new
google.visualization.NumberFormat({fractionDigits: 0,suffix: '%'});
        formatter.format(data, 1);

        var gaugeChart = new
google.visualization.Gauge(document.getElementById('gaugeChart'));
        var options = {width: 100, height: 100, minorTicks: 5};

        gaugeChart.draw(data, options);

        setInterval(function(){
                data.setValue(0, 1, 24);
                formatter.format(data, 1);
                gaugeChart.draw(data, options);
        }, 1000);
}

After the setInterval update, the suffix '%' disappear!

Any idea?

Thanks

-- 
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.

Reply via email to