|
Warning: The only browser these examples seem to work fully on is Firefox. A HTML5 pie chartA HTML5 pie chart that is implemented using the canvas tag. Good for showing items as a part/percentage of a whole.
<canvas id="myPie" width="250" height="250" style="margin-right: 20px">
<script type="text/javascript">
This is a pie chart Useful for expressing something as part of a whole. Think percentages, but a pie chart is somewhat more visual The white bits seperating the segments are done by simply specifying the line colour to be white. In effect, it looks like the pie segments are exploded. Kaboom. The values for this pie chart represent the market shares for browsers on June 30th 2008. Legends
No not me, but some sort of key could be made by doing it manually (kind of), using the same colours as the pie chart.
Eg:
Browser market share at the beginning of July 2008
Microsoft Internet Explorer 7 (41%)
Microsoft Internet Explorer 6 (37%) Firefox (16%) Safari (3%) Other (3%) Similar graph typesI 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, eg percentages. DownloadDownload the Javascript file. |
