A responsive Bar chart and HBar chart

This is an example of a Bar chart that switches to a Horizontal bar chart when the screen size is smaller. resize your browser window to see the effect.

[No canvas support]

This goes in the documents header:

<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.common.tooltips.js"></script>
<script src="RGraph.hbar.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<div style="text-align: center; margin: 35px">
    <canvas id="cvs" width="700" height="300">[No canvas support]</canvas>
</div>
This is the code that generates the chart - it should be placed AFTER the canvas tag(s):