An adjustable SVG Segmented donut chart

Here we have two examples of adjustable SVG Segmented Donut charts. The red one uses a custom onclick event listener (which you can see below) whilst the green chart uses the built in adjusting feature - which doesn't use animation.

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.segmented.js"></script>
Put this where you want the chart to show up:
<div style="width: 350px; height: 350px" id="chart-container"></div>
This is the code that generates the chart: