This question is locked. New answers and comments are not allowed.
Hi!
I am trying to resize the plot area in order to prevent the legend overlapping the chart. Since longer texts in the legend takes up more space i try to set the right margin of the plot area to the width of the legend.
I am trying achiev that by this line of code:
chartTrend.PlotArea.Appearance.Dimensions.Margins.Right.Value = chartTrend.Legend.Appearance.Dimensions.Width.Value + 35;
The problem is that chartTrend.Legend.Appearance.Dimensions.Width.Value always is zero!
Is this the best approach or is there another way of resizing the plot area so it will not be overlapped by the legend?
I am trying to resize the plot area in order to prevent the legend overlapping the chart. Since longer texts in the legend takes up more space i try to set the right margin of the plot area to the width of the legend.
I am trying achiev that by this line of code:
chartTrend.PlotArea.Appearance.Dimensions.Margins.Right.Value = chartTrend.Legend.Appearance.Dimensions.Width.Value + 35;
The problem is that chartTrend.Legend.Appearance.Dimensions.Width.Value always is zero!
Is this the best approach or is there another way of resizing the plot area so it will not be overlapped by the legend?