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

Josh Meeks 1 Reputation point
2022-02-28T14:59:27.46+00:00

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

// Insert the chart on sheet 'ChartSheet' at cell "D1".
let chart_2 = chartSheet.addChart(ExcelScript.ChartType.columnClustered, targetRange);
(ExcelScript.ChartTextVerticalAlignment.bottom);
chart_2.setPosition('D1');
// 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