{description}
{excerpt}Sets or returns how the legend will be positioned in relation to the chart's plot area.{excerpt}
{signature:C#}
 public LegendLocation Location{ get; set; }
{signature}{signature:vb.net}
Public Property Location() As LegendLocation
{signature}
{remarks}If you manually set any of the [ChartRegion|ChartRegion] properties [Height|ChartRegion.Height], [Width|ChartRegion.Width], [X|ChartRegion.X], or [Y|ChartRegion.Y], the [Location|Legend.LegendLocation] 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.
{remarks}