This is a migrated thread and some comments may be shown as answers.

Resizing plot area

1 Answer 122 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Oskar
Top achievements
Rank 1
Oskar asked on 21 Sep 2007, 03:27 PM
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?

1 Answer, 1 is accepted

Sort by
0
Kiril
Telerik team
answered on 24 Sep 2007, 04:16 PM
Hello Oskar ,

Thank you for this useful feature request. Currently, there is no automated way to make sure that the legend does not overlap with the plot area. In the future, however, we plan to support this feature.

In order to get this functionality right now with the latest version of RadChart, you can set the right margin of the PlotArea of the RadChart using the Property builder. Select the RadChart control, and navigate in the property builder to

PlotArea > Appearance > Dimensions > Margins

Set the right margin to an absolute value (in pixels) which would approximate the width of your legend. You may have to run your application a few times to arrive at a good value so that the plot area would be pushed far enough to the left so that it will not overlap with the legend .

Thank you for your time. If you have any additional questions, don't hesitate to contact us.

Kind regards,
Kiril
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (obsolete as of Q1 2013)
Asked by
Oskar
Top achievements
Rank 1
Answers by
Kiril
Telerik team
Share this question
or