A simple SVG Bar chart
An SVG Bar chart of the earnings of Britain's highest paid boss. As you can see there's quite a jump up to £469m. A good year!
She founded Bet365 - an online gambling firm. Who would have guessed that gambling could be so profitable?! Ok perhaps everyone in the world! Personally though, if a company that I started earned just (?) five million pounds - I'd retire!
The chart itself is quite straight-forward with a single solid color for the bars, a small
marginInner setting and large text. Being like this though makes the clarity
of the chart quite good.
It also uses the
labelsAbove setting to show the exact figures that the bars
For smaller screens the CSS
float is removed from the SVG tag and the size of the text
on the chart is reduced.
<script src="RGraph.svg.common.core.js"></script> <script src="RGraph.svg.bar.js"></script>Put this where you want the chart to show up:
<div style="padding: 15px"> <div style="width: 900px; height: 350px" id="chart-container"></div> </div>This is the code that generates the chart: