Grafiğin Veri Etiketlerinin Şekil Türünü Ayarlama

Olası Kullanım Senaryoları

DataLabels.ShapeType özelliğini kullanarak grafiğin veri etiketlerinin şekil türünü değiştirebilirsiniz. DataLabelShapeType numaralandırmasının değerini alır ve buna göre veri etiketlerinin şekil tipini değiştirir. Değerlerinden bazıları

 DataLabelShapeType.BentLineCallout

DataLabelShapeType.DownArrowCallout

DataLabelShapeType.Ellipse

DataLabelShapeType.LineCallout

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ü DataLabelShapeType.WedgeEllipseCallout olarak değiştirir. 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.

yapılacaklar:resim_alternatif_metin

Basit kod

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
//Load source Excel file
Workbook wb = new Workbook("sampleSetShapeTypeOfDataLabelsOfChart.xlsx");
//Access first worksheet
Worksheet ws = wb.Worksheets[0];
//Access first chart
Chart ch = ws.Charts[0];
//Access first series
Series srs = ch.NSeries[0];
//Set the shape type of data labels i.e. Speech Bubble Oval
srs.DataLabels.ShapeType = DataLabelShapeType.WedgeEllipseCallout;
//Save the output Excel file
wb.Save("outputSetShapeTypeOfDataLabelsOfChart.xlsx");