Google Visualization – Gauges

This is fun, a simple couple of gauges linked together, one showing revolutions per minute (rpm) the other showing speed, based upon 5th gear in a L322 Range Rover! I guess with more time than I have got it would be possible to code for the entire gearbox 😉

gauges

The code

Example – Open in Browser

The trick herre was to set the oldspeed variable as global, in order that the second call to draw chart2 could animate from the previous value

One thought on “Google Visualization – Gauges

  1. Thanks man. I could not get it to move. Nice inspiration 🙂
    I did it with delayed move

    // This is new.
    setTimeout(function(){
    var data = google.visualization.arrayToDataTable([
    [‘Label’, ‘Value’],
    [‘Match’,80],
    ]);
    chart.draw(data, options);
    }, 200);

    {edit} link removed

Leave a Reply

Your email address will not be published. Required fields are marked *