It does not work.
I've installed the onChange trigger with:
function createSpreadsheetChangeTrigger() {
var ss = SpreadsheetApp.getActive();
ScriptApp.newTrigger('onChange')
.forSpreadsheet(ss)
.onChange()
.create();
}
I can see it in triggers manager. Python adds row and the script is not fired.
Only manual edit triggers the script, below:
function onChange(e) {
var sheet = e.source.getActiveSheet();
mit = sheet.getRange(1,12).getValue();
mat = sheet.getRange(1,13).getValue();
mih = sheet.getRange(1,14).getValue();
mah = sheet.getRange(1,15).getValue();
var chart = sheet.getCharts()[0];
chart = chart.modify()
.setOption('vAxes.0.viewWindow.max', mat)
.setOption('vAxes.0.viewWindow.min', mit)
.build();
sheet.updateChart(chart);
var chart1 = sheet.getCharts()[1];
chart1 = chart1.modify()
.setOption('vAxes.0.viewWindow.max', mah)
.setOption('vAxes.0.viewWindow.min', mih)
.build();
sheet.updateChart(chart1);
}