This example of three donut charts shows how they can be nested inside each other.
This goes in the documents header:<script src="RGraph.common.core.js"></script> <script src="RGraph.pie.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="550" height="550"> [No canvas support] </canvas>This is the code that generates the chart:
<script> pie1 = new RGraph.Pie({ id: 'cvs', data: [4,3,5,6,8], options: { variant: 'donut', variantDonutWidth: 50, colorsStroke: 'white', linewidth: 5, marginLeft: 15, marginRight: 15, marginTop: 15, marginBottom: 15, shadowBlur: 25, shadowOffsetx: 0, shadowOffsety: 0 } }).draw() pie2 = new RGraph.Pie({ id: 'cvs', data: [5,4,8,6,2], options: { radius: pie1.radius - 50, variant: 'donut', variantDonutWidth: 50, colorsStroke: 'white', linewidth: 5, shadow: false } }).draw() pie3 = new RGraph.Pie({ id: 'cvs', data: [4,1,5,6,3], options: { radius: pie2.radius - 50, variant: 'donut', variantDonutWidth: 50, colorsStroke: 'white', linewidth: 5, shadowBlur: 25, shadowOffsetx: 0, shadowOffsety: 0 } }).draw() RGraph.ObjectRegistry.bringToFront(pie2); </script>