An SVG Line chart using the xaxisTickmarksHmargin option
This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.line.js"></script>
Put this where you want the chart to show up:
<div style="width: 750px; height: 300px" id="chart-container"></div>
This is the code that generates the chart:
<script>
new RGraph.SVG.Line({
id: 'chart-container',
data: [9,1,5,2,6,4,8],
options: {
linewidth: 3,
hmargin: 0,
title: 'A basic linechart',
gutterLeft: 50,
gutterBottom: 50,
yaxisDecimals: 2,
xaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
xaxisTickmarksHmargin: 0,
shadow: true
}
}).draw();
</script>
« Back