Like the canvas demo of a similar nature this is a demo of a Pie chart that
is configured as a donut chart and is customised to look like an activity
meter (though you can have it represent whatever data that you wish).
The chart is made by drawing a set of darkened Pie charts and then drawing
another set of Pie charts on top which have the second slice that they
show set to have transparent as the color - so that the darker Pie beneath
can show through. The text in the center is then added using the API with
the Pie chart centerx
and centery
variables.
<script src="RGraph.svg.common.core.js"></script> <script src="RGraph.svg.pie.js"></script>Put this where you want the chart to show up:
<div style="width: 500px; height: 500px" id="chart-container"></div>This is the code that generates the chart: