This is a demo of a chart being created by using the Google Sheets connector that's bundled with RGraph. You can see the Google Sheet that RGraph is fetching data from here. . The chart is using the exploded option.
This goes in the documents header:<script src="RGraph.svg.common.core.js"></script> <script src="RGraph.svg.common.sheets.js"></script> <script src="RGraph.svg.pie.js"></script>Put this where you want the chart to show up:
<div style="width: 1000px; height: 300px" id="chart-container"></div>This is the code that generates the chart:
<script> new RGraph.Sheets('1ncvARBgXaDjzuca9i7Jyep6JTv9kms-bbIzyAxbaT0E', function (sheet) { var data = sheet.get('B2:B13'), labels = sheet.get('A2:A13'); new RGraph.SVG.Pie({ id: 'chart-container', data: data, options: { labels: labels, strokestyle: 'white', linewidth: 2 } }).draw(); }); </script>