Grafiğin Veri Etiketlerinin Şekil Türünü Ayarlama
Contents
[
Hide
]
Olası Kullanım Senaryoları
kullanarak grafiğin veri etiketlerinin şekil türünü değiştirebilirsiniz.DataLabels.ShapeTypeEmlak. değerini alırDataLabelShapeTypenumaralandırma ve veri etiketlerinin şekil türünü buna göre değiştirir. Değerlerinden bazıları
DataLabelShapeType.BENT_LINE_CALLOUT
DataLabelShapeType.DOWN_ARROW_CALLOUT
DataLabelShapeType.ELLIPSE
DataLabelShapeType.LINE_CALLOUT
DataLabelShapeType.RECT
etc.
Grafiğin Veri Etiketlerinin Şekil Türünü Ayarlama
Aşağıdaki örnek kod, grafiğin veri etiketlerinin şekil türünü şu şekilde değiştirir:DataLabelShapeType.WEDGE_ELLIPSE_CALLOUT. Lütfen bkzörnek excel dosyasıBu kodda kullanılan veçıktı excel dosyasıonun tarafından oluşturulur. Ekran görüntüsü, kodun örnek Excel dosyası üzerindeki etkisini gösterir.
Basit kod
This file contains hidden or 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-Java | |
//Load source Excel file | |
Workbook wb = new Workbook("sampleSetShapeTypeOfDataLabelsOfChart.xlsx"); | |
//Access first worksheet | |
Worksheet ws = wb.getWorksheets().get(0); | |
//Access first chart | |
Chart ch = ws.getCharts().get(0); | |
//Access first series | |
Series srs = ch.getNSeries().get(0); | |
//Set the shape type of data labels i.e. Speech Bubble Oval | |
srs.getDataLabels().setShapeType(DataLabelShapeType.WEDGE_ELLIPSE_CALLOUT); | |
//Save the output Excel file | |
wb.save("outputSetShapeTypeOfDataLabelsOfChart.xlsx"); |