# A Meter chart with specific labels

This goes in the documents header:

    <script src="RGraph.common.core.js"></script>
    <script src="RGraph.common.dynamic.js"></script>
    <script src="RGraph.meter.js"></script>

Put this where you want the chart to show up:

    <canvas id="cvs" width="600" height="300">
        [No canvas support]
    </canvas>

This is the code that generates the chart:

    <script>
        var meter = new RGraph.Meter({
            id: 'cvs',
            min: 0,
            max: 200,
            value: 45,
            options: {
                anglesStart: RGraph.PI + 0.5,
                anglesEnd: RGraph.TWOPI - 0.5,
                linewidthSegments: 15,
                textSize: 16,
                strokestyle: 'white',
                segmentRadiusStart: 205,
                border: 0,
                tickmarksSmallNum: 0,
                tickmarksBigNum: 0,
                adjustable: true,
                labelsSpecific: [['Low',25],['Refill',75],['OK', 150]],
                redEnd: 50,
                yellowEnd: 100,
                textAccessible: false
            }
        }).draw();
    </script>

« Back