JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.google.com/jsapi?.js"></script>
<div id="chart_div"></div>
JavaScript
function drawChart () {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Category');
data.addColumn('number', 'Value');
data.addRows([
['foo', 4],
['bar', 6],
['baz', 7],
[null, 4] // add a blank space size 4 to the end of the pie
]);
// Create and draw the visualization.
var chart = new google.visualization.PieChart(document.querySelector('#chart_div'));
chart.draw(data, {
height: 400,
width: 600,
slices: {
3: {
// set the color of the 4th pie slice to 'transparent'
color: 'transparent'
}
}
});
}
google.load('visualization', '1', {packages:['corechart'], callback: drawChart});