Page tree
Skip to end of metadata
Go to start of metadata

Description

Sets or returns how the legend will be positioned in relation to the chart's plot area.
C#
vb.net

Remarks

If you manually set any of the ChartRegion properties Height, Width, X, or Y, the Location will be set to NotDocked.

If you manually set Location to be a LegendLocation other than LegendLocation.NotDocked, the legend will be docked and Excel will position the legend accordingly. There are subtle differences in how Excel displays the legend, especially when expanding or shrinking the chart, so the X, Y, Width, and Height properties do not have meaning for a docked legend.

The Vertical property does not correspond to a specific feature in Excel. It approximates new width and height values so that the legend entries are stacked vertically or horizontally.

  • No labels