<canvas width="600" height="250" id="myBarChart">
<span style="color: red">
This is the fallback HTML that is shown if the browser doesn't support the canvas tag.
If you're seeing this then you're probably using IE7. You need to use something else.
</span>
</canvas>
And the Javascript is:
<script type="text/javascript">
<!--
data = [0,1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153,171,190,210,231,253,276,300];
bar = new BarChart(document.getElementById("myBarChart"), data);
bar.ShowGrid(1);
bar.SetGridColor('#fee');
bar.SetBarColor(gradient); // The actual bars
bar.SetBarColors('#fdd', '#fcc'); // The background bars
bar.SetYTickGap(20);
bar.SetSmallYTickSize(3);
bar.SetLargeYTickSize(5);
bar.SetMargin(3);
bar.SetBarColor(gradient);
bar.SetOutlineColor('#666');
bar.ShowLine(false);
bar.Draw();
// -->
</script>
The canvas tag for this is the same:
<canvas width="600" height="250" id="myBarChart2">
<span style="color: red">
This is the fallback HTML that is shown if the browser doesn't support the canvas tag.
If you're seeing this then you're probably using IE7. You need to use something else.
</span>
</canvas>
I might also create a "stacked bar". Similar to a pie chart, but a bar. Like a pie chart it would be best for showing
something as a part of a whole, ie percentages.
Download
If you want the source, it's all Javascript so you can view source to get the code, along with downloading the actual
bar cart class here.