Ändra kryssetikettens riktning
Contents
[
Hide
]
Ä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
Utdatafilbild
Följande kodavsnitt ändrar kryssetikettens riktning från Rotate90 till Horizontal.
Exempelkod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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.