Is there a way to modify the leader line items display total in addition to percentage in Google Apps Script generated pie chart?
Is there a way to adjust the leader line labels on a pie chart generated using Google Apps Script in Google Docs? Currently the lines show the label and the percentage of the slice.
Ideally, I'd like it to either list the Total Value of the Slice & the percentage, but even if I can just get it to show the Total Value only would work. I've tried searching Google's documentation but can't seem to find anything other then putting the values on the slices themself (Which I think makes the charts look really poorly made when the value can even fit on the slice).
I've included a code snippet showing how the chart is built, as well as an example chart with the item I'm looking to adjust circled. Hopefully I formated the code block correct on this, since it's my first post! Thank you so much for your help!
var chart = Charts.newPieChart()
.setTitle('Chart Title')
.setDimensions(864,534)
.setDataTable(dataTable)
.setColors(["#1CADE4", "#00B6DE", "#00BECC", "#00C3B0", "00C68B", "#56C663"])
.setOption('legend',{position: 'labeled', textstyle: {color: 'black',
fontsize: 10}})
.setOption('pieSliceText', 'none')
.build()
Via Active questions tagged javascript - Stack Overflow https://ift.tt/pkISKQO
Comments
Post a Comment