Fuel Gauge


function drawChart() {

var data = google.visualization.arrayToDataTable([ ['Label', 'Value'], ['Fuel Level', 0], ]);

var options = { width: 1000, height: 300, yellowFrom:90, yellowTo: 100, redFrom: 0, redTo: 10, minorTicks: 5 //gauge indicators };

var chart = new google.visualization.Gauge(document.getElementById('chart_div'));

chart.draw(data, options);

setInterval(function() { data.setValue(0, 1, 80 + Math.round(3 * Math.random()));//Start, interval?, end, change range chart.draw(data, options);

}, 1200); //frequency of change }