// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); IShape shape = worksheet.getShapes().addChart(ChartType.ColumnClustered, 300, 10, 300, 300); worksheet.getRange("A1:D6").setValue(new Object[][]{ {null, "S1", "S2", "S3"}, {"Product Item1", 10, 25, 25}, {"Product Item2", -51, -36, 27}, {"Product Item3", 52, -85, -30}, {"Product Item4", 22, 65, 65}, {"Product Item5", 23, 69, 69} }); worksheet.getRange("A1:D6").autoFit(); // Create chart. shape.getChart().getSeriesCollection().add(worksheet.getRange("A1:D6"), RowCol.Columns, true, true); IAxis categoryAxis = shape.getChart().getAxes().item(AxisType.Category); // Set category axis label to be stacked, and the text reading order from right to left. categoryAxis.getTickLabels().setDirection(TextDirection.StackedRtl); // Save to an excel file workbook.save("SetChartTextDirection.xlsx");