I´m trying to modify a chart in Google Sheets using Google App Script. I figured out how to do most of the things I need to do, except for one. I need to change the position of the Data Label in the chart. The chart is a Combo Chart that has line and bar charts.
The following code shows the dataLabels, but I can´t find how to change its position(eg. "center","below", etc..).
function myFunction() {
var sheet = SpreadsheetApp.getActiveSheet();
var chart = sheet.getCharts()[0];
chart = chart.modify()
.setOption('series',{0: {dataLabel: 'value'},1: {dataLabel: 'value',targetAxisIndex: 1}})
.build();
sheet.updateChart(chart);
}
Apparently there is now documentation on it, but some people found a way to display the dataLabel (Programatically show data labels in Google Spreadsheet Embedded Line Chart). I was wondering if any one knows how to change the position of the data label.