Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Signature
vb.net
vb.net
Public Property Location() As LegendLocation
Remarks

If you manually set Location to any position except NotDocked, any of the ChartRegion properties Height, Width, X, and or Y, the Location will be automatically updated to reflect the new positionset to NotDocked.

If you manually set any of the ChartRegion properties Height, Width, X, or Y, the Location will be set to NotDocked. 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.