How to position the labels (years, in this case) at the very bottom of the cart using Excel Office Scripts?
I've tried this without luck:
chart_3.getAxes().getCategoryAxis().setPosition(ExcelScript.ChartAxisPosition.minimum);
setPosition(ExcelScript.ChartAxisPosition.minimum)
doesn't work. I believe it might be a bug.
getAxes().getValueAxis().setPositionAt()
is used to change the position of horizontal axis (and labels).
Here's a walkaround solution.
function main(workbook: ExcelScript.Workbook) {
let cht = workbook.getActiveChart();
const min_val = cht.getAxes().getValueAxis().getMinimum();
cht.getAxes().getValueAxis().setPositionAt(min_val);
}