A dual color Line chart
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>
line = new RGraph.Line({
id: 'cvs',
data: [5,4,1,6,null,null,null],
options: {
xaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
colors: ['black'],
title: 'A dual color line chart',
titleSize: 16,
titleBold: true,
tickmarksStyle: 'filledcircle',
tickmarksSize: 5,
shadow: false,
marginTop: 35,
marginRight: 30,
marginLeft: 30
}
}).draw();
line2 = new RGraph.Line({
id: 'cvs',
data: [null,null,null,6,5,4,3],
options: {
colors: ['red'],
tickmarksStyle: 'filledcircle',
tickmarksSize: 5,
shadow: false,
backgroundGrid: false,
axes: false,
marginTop: 35,
marginRight: 30,
marginLeft: 30
}
}).draw();
</script>