Ändra kryssetikettens riktning

Ändra kryssetikettens riktning

Aspose.Cells ger dig möjligheten att ändra riktningen för kartmarkeringsetiketten genom att användaTickLabels.DirectionType fast egendom. DeTickLabels.DirectionType egendom accepterarChartTextDirectionType uppräkningsvärde. DeChartTextDirectionTypeuppräkning ger följande medlemmar

  • Horisontell
  • Vertikal
  • Rotera 90
  • Rotera 270
  • Staplad

Följande bild jämför käll- och utdatafilerna

Källfilsbild

todo:image_alt_text

Utdatafilbild

todo:image_alt_text

Följande kodavsnitt ändrar kryssetikettens riktning från Rotate90 till Horizontal.

Exempelkod

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
Workbook workbook = new Workbook(sourceDir + "SampleChangeTickLabelDirection.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
// Load the chart from source worksheet
Chart chart = worksheet.Charts[0];
chart.CategoryAxis.TickLabels.DirectionType = ChartTextDirectionType.Horizontal;
// Output the file
workbook.Save(outputDir + "outputChangeChartDataLableDirection.xlsx");

Käll- och utdatafilerna kan laddas ner från följande länkar.

Källfilen

Utdatafil