A spline SVG Line chart
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: [
[4,1,8,6,3,5,4,2,9,3,6,3],
[1,9,6,3,4,6,8,5,5,5,2,8],
[4,6,3,5,2,8,9,5,6,5,6,1],
[4,8,6,3,5,4,2,5,1,6,9,9]
],
options: {
backgroundGridVlines: false,
backgroundGridBorder: false,
yaxis: false,
gutterLeft: 50,
gutterBottom: 50,
linewidth: 5,
spline: true,
shadow: true,
shadowOpacity: .25,
title: 'A multi-line spline chart',
xaxisLabels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
}
}).draw();
</script>
« Back