How do I move the horizontal lables in my Excel Online using Office Scripts

Josh Meeks 1 Reputation point

// Add the selected data to the new worksheet.
const targetRange = chartSheet.getRange('A1').getResizedRange(selectColumns.length - 1, selectColumns[0].length - 1);

// Insert the chart on sheet 'ChartSheet' at cell "D1".
let chart_2 = chartSheet.addChart(ExcelScript.ChartType.columnClustered, targetRange);
// Set text on title for a chart
chart_2.getTitle().setText("Average Knowledge Gain FY'22");
// Added/Removed serries trendline to/from chart
chart_2.getSeries()[0].addChartTrendline() ;
////// (ExcelScript.ChartTextVerticalAlignment.bottom);
// ActiveChart.ChartArea.Select
// ActiveChart.Axes(xlCategory).Select
//Selection.TickLabelPosition = xlNextToAxis
//Selection.TickLabelPosition = xlLow
chart_2 .getChartAxis().setTickLabelPosition().
; 178490-current-view-incorrect.jpg178520-correct-view.jpg

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,596 questions
0 comments No comments
{count} votes