A basic SVG Rose chart
This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.rose.js"></script>
Put this where you want the chart to show up:
<div style="width: 500px; height: 500px" id="chart-container"></div>
This is the code that generates the chart:
<script>
rose = new RGraph.SVG.Rose({
id: 'chart-container',
data: [8,6,4,3,9,1,5],
options: {
scaleUnitsPost: '%',
scaleDecimals: 1,
colors: ['red'],
linewidth: 2,
backgroundGridColor: '#aaa',
backgroundGridRadialsCount: 0,
margin: 0.05,
//margin: '5deg',
strokestyle: 'transparent',
tooltips: ['Alf','Bertie','Charlie','Doug','Edgar','Frankie','Gary'],
title: 'Bobs Day at the races',
titleY: 35,
titleSubtitle: 'A chart showing winners of the individual races',
gutterTop: 50
}
}).draw();
</script>
« Back