google.charts.setOnLoadCallback(drawChart); jQuery(window).resize(drawChart); function drawChart() { var options = { chartArea:{left: 10, top: 10, width: '90%', height: '90%'}, backgroundColor: {fill: '#EEE'}, is3D: true, legend: {position:'labeled'}, pieSliceText: 'none', slices: {0: {color: 'rgb(48, 119, 61)'}, 1: {color: 'rgb(119, 61,48)'}, 2: {color: 'rgb(240, 116, 14)'}}, tooltip: {text: 'percentage', trigger: 'selection'}}; var data = google.visualization.arrayToDataTable([ ['Post', 'Kosten'], ['Prijs waterontharder', 60], ['Arbeid', 35], ['Montagematerialen', 5]]); var chart = new google.visualization.PieChart(document.getElementById('waterontharderchart')); chart.draw(data, options); }