An SVG Pie chart using the Google Sheets connector

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 and there's documentation for the Google Sheets Connector here.

It's actually using the data that's on the Bar worksheet (there are multiple buttons at the bottom of the screen that allow you access to the other worksheets). The labels are coming from the spreadsheet too.

The stroke color is set to white and the linewidth is 2. There's no other configuration so the Pie chart looks quite standard, though there is a responsive configuration so that on smaller screens the labels disappear and tooltips are used instead.


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: 650px; height: 300px" id="chart-container"></div>
This is the code that generates the chart: