A grouped Bar chart
A grouped Bar chart showing motor vehicle sales which has three bars per group along with a turquoise color theme.
A straightforward Bar chart with a nice aesthetic to it. This style (ie the colors) of chart is frequently used by the BBC news website.
It's a grouped Bar chart with three data pieces per segment (the third data pieces are quite small when compared to the other two).
The background grid vertical lines are disabled (there's still a border around the edge of the grid) and there's a key that's positioned in the margin, on the left-hand side.
If you like this style of chart, then you could also try a slightly larger font size.
responsive() function alters the text sizes of the chart and changes the CSS
value of the
float property so that on smaller screens it's not aligned to the
There now some tooltips on the chart which use both the
tooltipsCss property and
the formatted tooltips feature. These use a white-on-black theme and are left aligned - both using
CSS. As a result they have a nice aesthetic to them.
This goes in the documents header:
<script src="RGraph.common.core.js"></script> <script src="RGraph.common.key.js"></script> <script src="RGraph.bar.js"></script>Put this where you want the chart to show up:
<div style="display: inline-block; margin: 35px; float: right"> <canvas id="cvs" width="600" height="300">[No canvas support]</canvas> </div>This is the code that generates the chart: