Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a legend entry in a chart legend.
public interface class LegendEntry
[System.Runtime.InteropServices.Guid("000208BA-0000-0000-C000-000000000046")] [System.Runtime.InteropServices.InterfaceType(2)] public interface LegendEntry
Public Interface LegendEntry
The LegendEntry object is a member of the LegendEntries collection. The LegendEntries collection contains all the LegendEntry objects in the legend.
Each legend entry has two parts: the text of the entry, which is the name of the series associated with the legend entry, and an entry marker, which visually links the legend entry with its associated series or trendline in the chart. Formatting properties for the entry marker and its associated series or trendline are contained in the LegendKey object.
The text of a legend entry cannot be changed. LegendEntry objects support font formatting, and they can be deleted. No pattern formatting is supported for legend entries. The position and size of entries is fixed.
index is the legend entry index number, to return a single LegendEntry object. You cannot return legend entries by name.
The index number represents the position of the legend entry in the legend. LegendEntries(1) is at the top of the legend, and LegendEntries(LegendEntries.Count) is at the bottom.
There’s no direct way to return the series or trendline corresponding to the legend entry.
After legend entries have been deleted, the only way to restore them is to remove and recreate the legend that contained them by setting the HasLegend property for the chart to False and then back to True.
Returns an Application object that represents the Microsoft Excel application.
True if the text in the object changes font size when the object size changes. The default value is True.
Returns a 32-bit integer that indicates the application in which this object was created.
Returns a Font object that represents the font of the specified object.
Returns the ChartFormat object. Read-only.
The height, in points, of the object.
Returns the index number of the object within the collection of similar objects.
The distance, in points, from the left edge of the object to the left edge of the chart area.
Returns a LegendKey object that represents the legend key associated with the entry.
Returns the parent object for the specified object.
The distance, in points, from the top edge of the object to the top of the chart area.
The width, in points, of the object.
Deletes the object.
Selects the object.