Legend Legend Legend Interface

Definition

Represents the legend in a chart.

public interface class Legend
[System.Runtime.InteropServices.Guid("000208CD-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Legend
Public Interface Legend
Attributes

Remarks

Each chart can have only one legend. The Legend object contains one or more LegendEntry objects; each LegendEntry object contains a LegendKey object.

Use the Legend property to return the Legend object.

The chart legend isn’t visible unless the HasLegend property is True. If this property is False, properties and methods of the Legend object will fail.

Properties

Application Application Application

Returns an Application object that represents the Microsoft Excel application.

AutoScaleFont AutoScaleFont AutoScaleFont

True if the text in the object changes font size when the object size changes. The default value is True.

Border Border Border

Returns a Border object that represents the border of the object.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Fill Fill Fill

Returns a ChartFillFormat object that contains fill formatting properties for the specified chart legend.

Font Font Font

Returns a Font object that represents the font of the specified object.

Format Format Format

Returns the ChartFormat object. Read-only.

Height Height Height

The height, in points, of the object.

IncludeInLayout IncludeInLayout IncludeInLayout

True if a legend will occupy the chart layout space when a chart layout is being determined. The default value is True. Read/write Boolean.

Interior Interior Interior

Returns an Interior object that represents the interior of the specified object.

Left Left Left

The distance, in points, from the left edge of the object to the left edge of the chart area.

Name Name Name

Returns the name of the object.

Parent Parent Parent

Returns the parent object for the specified object.

Position Position Position

Returns or sets the position of the legend on the chart.

Shadow Shadow Shadow

True if the font is a shadow font or if the object has a shadow.

Top Top Top

The distance, in points, from the top edge of the object to the top of the chart area.

Width Width Width

The width, in points, of the object.

Methods

Clear() Clear() Clear()

Clears the entire object.

Delete() Delete() Delete()

Deletes the object.

LegendEntries(Object) LegendEntries(Object) LegendEntries(Object)

Returns an object that represents either a single legend entry (a LegendEntry object) or a collection of legend entries (a LegendEntries object) for the legend.

Select() Select() Select()

Selects the object.

Applies to