A Gauge chart using the valueText option
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="250" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
new RGraph.Gauge({
id: 'cvs',
min: 0,
max: 10,
value: 5.2,
options: {
valueText: true,
valueTextDecimals: 1,
valueTextBounding: false,
valueTextYPos: 0.65,
valueTextUnitsPost: '%',
valueTextSize: 14,
valueTextItalic: true,
valueTextBold: true,
valueTextBounding: true,
valueTextBoundingFill: '#eee',
valueTextBoundingStroke: '#ccc',
textSize: 12,
redWidth: 15,
yellowWidth: 15,
labelsCentered: true,
labelsOffsetAngle: 0,
labelsOffsetRadius: 25,
labelsOffsetx: 0,
labelsOffsety: 0
}
}).grow();
</script>
« Back