With this chart the title is not drawn using the title property - instead it is drawn using the ondraw custom event along with the RGraph.Text() API function.
This goes in the documents header:<script src="RGraph.common.core.js"></script> <script src="RGraph.hprogress.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="100"> [No canvas support] </canvas>This is the code that generates the chart:
<script>
hprogress = new RGraph.HProgress({
id: 'cvs',
min: 0,
max: 100,
value: 89,
options: {
}
}).on('draw', function (obj)
{
obj.context.fillStyle = 'black';
RGraph.text2(obj, {
font: 'Arial',
italic: true,
size: 16,
x: obj.canvas.width / 2,
y: obj.get('marginTop') - 5,
text: 'A custom title drawn with the ondraw event',
valign: 'bottom',
halign: 'center'
});
}).draw();
</script>