Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
LegendKey Object
Collapse the table of content
Expand the table of content

LegendKey Object

Office 2003
Multiple objects

Represents a legend key in the specified chart legend. Each legend key is a graphic that visually links a legend entry with its associated series or trendline in the chart. The legend key is linked to its associated series or trendline in such a way that changing the formatting of one simultaneously changes the formatting of the other.

Using the LegendKey Object

Use the LegendKey property to return the LegendKey object. The following example changes the marker background color to blue for the legend entry at the top of the legend in the chart. This simultaneously changes the formatting of every point in the series associated with this legend entry (if, that is, the associated series supports data markers).

myChart.Legend.LegendEntries(1) _
    .LegendKey.MarkerBackgroundColorIndex = 5

Properties | Application Property | Border Property | Creator Property | Fill Property | Height Property | Interior Property | InvertIfNegative Property | Left Property | MarkerBackgroundColor Property | MarkerBackgroundColorIndex Property | MarkerForegroundColor Property | MarkerForegroundColorIndex Property | MarkerSize Property | MarkerStyle Property | Parent Property | PictureType Property | PictureUnit Property | Shadow Property | Smooth Property | Top Property | Width Property

Parent Objects | LegendEntry Object

© 2015 Microsoft