Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells provides you with the ability to change the chart tick label direction by using the TickLabels.getDirectionType() property. The TickLabels.getDirectionType() property accepts the ChartTextDirectionType enumeration value. The ChartTextDirectionType enumeration provides the following members:
The following image compares the source and output files


The following code snippet changes the tick label direction from Rotate90 to Horizontal.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const sourceDir = path.join(__dirname, "data");
const outputDir = path.join(__dirname, "output");
const filePath = path.join(sourceDir, "SampleChangeTickLabelDirection.xlsx");
// Loads the workbook which contains hidden external links
const workbook = new AsposeCells.Workbook(filePath);
const worksheet = workbook.getWorksheets().get(0);
// Load the chart from source worksheet
const chart = worksheet.getCharts().get(0);
chart.getCategoryAxis().getTickLabels().setDirectionType(AsposeCells.ChartTextDirectionType.Horizontal);
// Output the file
workbook.save(path.join(outputDir, "outputChangeChartDataLableDirection.xlsx"));
The source and output files can be downloaded from the following links.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.