A Gauge chart with non-zero maximum and minimum values

Here's a straight-forward Gauge chart that shows how you can use a non-zero minimum value. It also uses the colorsRanges property to add the red, yellow, green, yellow and red bars around the Gauge. It's also adjustable by way of a small snippet of custom code (that's shown below in the code). By doing this instead of using the built-in adjusting, the movement of the needle can be animated using the grow() effect.

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.gauge.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="350" height="350">
    [No canvas support]
This is the code that generates the chart:
    var gauge = new RGraph.Gauge({
        id: 'cvs',
        min: -50,
        max: 50,
        value: 26,
        options: {
            valueTextUnitsPost: 'mm',
            tickmarksSmall: 50,
            tickmarksLarge: 5,
            tickmarksLarge: 5,
            labelsCount: 10,
            colorsRanges: [
                [-40,40, '#cfc'],
                [40,45, 'yellow'],

    * This is all the code that's necessary to make the Gauge interactive
    gauge.canvas.addEventListener('mousedown', function (e)
        var gauge = RGraph.ObjectRegistry.getObjectByXY(e);
        gauge.value = gauge.getValue(e);
    }, false);