A basic SVG HBar chart
This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.bar.js"></script>
Put this where you want the chart to show up:
<div style="padding: 15px">
<div style="width: 450px; height: 500px" id="chart-container"></div>
</div>
This is the code that generates the chart:
<script>
new RGraph.SVG.HBar({
id: 'chart-container',
data: [14,16,24,26,23,45,12],
options: {
yaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
xaxis: false,
backgroundGridHlines: false,
backgroundGridBorder: false,
title: 'A basic HBar chart'
}
}).draw();
</script>
« Back