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'],
tickmarks: ['filledsquare', 'filledcircle'],
ticksize: 7,
linewidth: 5,
shadow: false,
backgroundGridAutofitNumhlines: 6,
backgroundGridVlines: false,
backgroundGridBorder: false,
hmargin: 30,
labels: ['1996','1997','1998','1999','2000','2001'],
ymax: 600,
ylabelsCount: 6,
numyticks: 6,
gutterLeft: 50,
textSize: 16,
ylabelsOffsetx: -5
}
}).draw();
</script>