[]
Represents the collection of legend entries in a chart legend.
Use this interface to access individual ILegendEntry objects in a legend, iterate through the entries, and retrieve the legend that owns the collection. This collection is returned by LegendEntries.
public interface ILegendEntries : IEnumerable<ILegendEntry>, IEnumerable
Public Interface ILegendEntries
Inherits IEnumerable(Of ILegendEntry), IEnumerable
worksheet.Range["A1:B3"].Value = new object[,] {
{"Region", "Sales"},
{"North", 100},
{"South", 200}
};
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 200, 20, 300, 200);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B3"], RowCol.Columns, true, true);
ILegendEntries legendEntries = shape.Chart.Legend.LegendEntries;
ILegendEntry firstEntry = legendEntries[0];
| Name | Description |
|---|---|
| Count | Gets the number of legend entries in the collection. Use this property to determine how many ILegendEntry objects are contained in the legend for a chart. |
| this[int] | Gets the legend entry at the specified index. Use this property to access a single ILegendEntry object from the current legend entry collection. |
| Parent | Gets the parent legend that contains this legend entry collection. Use this property to access the ILegend object that owns the current ILegendEntries collection. |