# A customised Gauge chart

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="300" height="300">
        [No canvas support]
    </canvas>

This is the code that generates the chart:

    <script>
        window.onload = function ()
        {
            var gauge = new RGraph.Gauge({
                id: 'cvs',
                min: 0,
                max: 200,
                value: [184,12],
                options: {
                    titleTop: 'Air Speed',
                    titleTopSize: '22',
                    titleTopFont: 'Impact',
                    titleTopColor: 'white',
                    titleBottom: 'Knots',
                    titleBottomSize: 'Italic 14',
                    titleBottomFont: 'Impact',
                    titleBottomColor: '#ccc',
                    titleBottomPos: 0.4,
                    backgroundColor: 'black',
                    backgroundGradient: true,
                    centerpinColor: '#666',
                    needleSize: [null, 50],
                    needleColors: ['Gradient(transparent:white:white:white:white:white)', 'Gradient(transparent:#d66:#d66:#d66:#d66)'],
                    textColor: 'white',
                    tickmarksBigColor: 'white',
                    tickmarksMediumColor: 'white',
                    tickmarksSmallColor: 'white',
                    borderOuter: '#666',
                    borderInner: '#333',
                    colorsRanges: [[160,200,'rgba(255,0,0,1)'], [120,160,'rgba(255,255,0,0.95']],
                    textAccessible: true
                }
            }).draw();
        };
    </script>