A dynamic Thermometer chart

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.effects.js"></script>
<script src="RGraph.thermometer.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="100" height="400">
    [No canvas support]
This is the code that generates the chart:
    value = RGraph.random(0, 100)
    if (typeof thermometer == 'undefined') {
        // A global on purpose
        thermometer = new RGraph.Thermometer({
            id: 'cvs',
            min: 0,
            max: 100,
            value: value,
            options: {
                textAccessible: true
    } else {
        thermometer.value = value;

    setTimeout(function ()
    }, 5000);