A stacked SVG Radar chart
This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.radar.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>
data = [];
for (var j=0; j<5; ++j) {
data[j]=[]
for (var i=0; i<50; ++i) {
data[j][i] = RGraph.SVG.random(9,10,2);
}
}
// Create the labels
for (var i=0,labels=[]; i<25; ++i) {
labels.push(1990+i)
}
new RGraph.SVG.Radar({
id: 'chart-container',
data: data,
options: {
backgroundGridRadialsCount: 25,
filled: true,
filledAccumulative: true,
colors: ['red','blue','green','black','orange'],
scaleUnitsPost: 'kg',
tickmarks: false,
linewidth: 1,
labels: labels
}
}).draw();
</script>
« Back