I was recently adding the Google Charts and was facing problem in it, for Adding zero value in it.
Thanks for @ocanal, I used sliceVisibilityThreshold:0, but in some other way.
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['B-TRIPS', <?php echo $arr_get_a_org['total_trips']; ?>],
['Reimbursed', <?php echo $arr_get_a_org['reimbursed_trips']; ?>],
['Approved', <?php echo $arr_get_a_org['approved_trips']; ?>],
['Pending', <?php echo $arr_get_a_org['pending_trips']; ?>]
// ['Sleep', <?php echo $arr_get_a_org['total_trips']; ?>]
]);
var options = {
title: 'OVERVIEW',
backgroundColor:'#e2e1e0',
pieSliceText:'value',
sliceVisibilityThreshold :0
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
As the way of defining of options have changed, for more info check out Google Chart site