You can use the Position property to position the Legend relative to the Plot Area, as per your requirements.
The Position property can be set to any of the following values in the Position enumeration:
Property | Description |
---|---|
Position.Auto | Positions the legend automatically. |
Position.Bottom | Positions the legend below the plot. |
Position.Left | Positions the legend to the left of the plot. |
Position.None | Hides the legend. |
Position.Right (default value) | Positions the legend to the right of the plot. |
Position.Top | Positions the legend above the plot. |
Here is the code snippet for setting the property: