A Bar chart showing search result clickthru rates
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.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>
data = [36.4,12.5,9.5,7.9,6.1,4.1,3.8,3.5,3.0,2.2];
bar = new RGraph.Bar({
id: 'cvs',
data: data,
options: {
backgroundGridBorder: false,
backgroundGridVlines: false,
marginBottom: 50,
marginLeft: 75,
yaxisScaleUnitsPost: '%',
xaxisLabels: [ 'One','Two','Three','Four','Five','Six','Seven','Eight','Nine','Ten'],
labelsAbove: true,
labelsAboveDecimals: 1,
labelsAboveSize: 12,
yaxis: false,
title: 'Search position clickthru rates',
titleSize: 14,
}
}).draw();
</script>