A Line chart showing students who left and joined the school
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.line.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
This is the code that generates the chart:
<script>
new RGraph.Line({
id:'cvs',
data: [
[250,450,400,350,450,450],
[325,300,425,500,400,530]
],
options: {
colors: ['red', 'blue'],
tickmarksStyle: ['filledsquare', 'filledcircle'],
tickmarksSize: 7,
linewidth: 5,
shadow: false,
backgroundGridHlinesCount: 6,
backgroundGridVlines: false,
backgroundGridBorder: false,
hmargin: 30,
xaxisLabels: ['1996','1997','1998','1999','2000','2001'],
yaxisScaleMax: 600,
yaxisLabelsCount: 6,
yaxisTickmarksCount: 6,
marginLeft: 50,
textSize: 16,
yaxisLabelsOffsetx: -5
}
}).draw();
</script>