ChartLegendEntryCollection

ChartLegendEntryCollection class

Grafik efsanesi girişlerinin bir koleksiyonunu temsil eder.

Daha fazla bilgi edinmek için şu adresi ziyaret edin:Grafiklerle Çalışma belgeleme makalesi.

public class ChartLegendEntryCollection : IEnumerable<ChartLegendEntry>

Özellikleri

İsimTanım
Count { get; }sayısını döndürürChartLegendEntry bu koleksiyonda.
Item { get; }Geri DöndürürChartLegendEntry belirtilen dizin için.

yöntemler

İsimTanım
GetEnumerator()Bir numaralandırıcı nesnesi döndürür.

Örnekler

Grafik serileri için bir gösterge girişiyle nasıl çalışılacağını gösterir.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.InsertChart(ChartType.Column, 432, 252);

Chart chart = shape.Chart;
ChartSeriesCollection series = chart.Series;
series.Clear();

string[] categories = new string[] { "AW Category 1", "AW Category 2" };

ChartSeries series1 = series.Add("Series 1", categories, new double[] { 1, 2 });
series.Add("Series 2", categories, new double[] { 3, 4 });
series.Add("Series 3", categories, new double[] { 5, 6 });
series.Add("Series 4", categories, new double[] { 0, 0 });

ChartLegendEntryCollection legendEntries = chart.Legend.LegendEntries;
legendEntries[3].IsHidden = true;

doc.Save(ArtifactsDir + "Charts.LegendEntries.docx");

Ayrıca bakınız