A daark colored SVG HBar chart
This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.hbar.js"></script>
Put this where you want the chart to show up:
<div style="padding: 15px">
<div style="width: 750px; height: 500px" id="chart-container"></div>
</div>
This is the code that generates the chart:
<script>
new RGraph.SVG.HBar({
id: 'chart-container',
data: [[20, 40],[18,80],[9,42],[40,58],[74,20],[20,73], [26,56]],
options: {
backgroundGrid: false,
xaxisColor: '#999',
xaxisTextColor: '#ccc',
yaxisTextColor: '#ccc',
yaxisColor: '#999',
yaxisLabels: ['Category 1','Category 2','Category 3','Category 4','Category 5','Category 6','Category 7'],
strokestyle: 'white',
vmargin: 15,
xaxisMin: -20,
xaxisMax: 80,
colors: ['#FFC500','#1E98E4'],
xaxisUnitsPost: 'pc'
}
}).wave({frames:90});
</script>
« Back