Googlecharts center pie chart labels and percentage

  charts, css, html, javascript

How can I center the text values of the chart? I am using googlecharts. Here is what I tried

          var chartFiltered = new google.visualization.PieChart(document.getElementById('piechart3all'));
            var data = google.visualization.arrayToDataTable([
                ['Task', 'Hours per Day'],
                ['Pending', Number(res.data[0].pending)],
                ['Approved', Number(res.data[0].approved)],
                ['Rejected', Number(res.data[0].rejected)],
            ])
            var options = {'width':650,'height':300, colors: ['#17a2b8', '#28a745', '#dc3545']};
            chartFiltered.draw(data,options)
            $('#piechart3all').show();

It resulted into

enter image description here

And this one

enter image description here

Is there any way I can center them? Thanks

Source: Ask Javascript Questions

LEAVE A COMMENT