How to limit max size of the legend?

Thread is closed for posting
2 posts, 0 answers
  1. Archis Gore
    Archis Gore avatar
    2 posts
    Member since:
    Jan 2010

    Posted 22 Mar 2010 Link to this post

    I have a scenario where I would like autolayout to work as it is, however, the legend, if it becomes too big, occupies all space on the chart. I would like to set a max limit for the legend height such as "30%" or something so that beyond a certain point, I want the chart to be fairly visible, even if it clips the legend.

    If possible, can the legend be made scrollable?
  2. Velin
    Velin avatar
    391 posts

    Posted 25 Mar 2010 Link to this post

    Hi Archis Gore,

    Unfortunately, using the AutoLayout property set to true does no allow you to specify the legend's dimensions. We would recommend you to use Autolayout = false and set the legend size by hand. here is a sample code:
    RadChart1.AutoLayout = false;
    RadChart1.Legend.Appearance.Dimensions.AutoSize = false;
    RadChart1.Legend.Appearance.Dimensions.Height = 100;
    RadChart1.Legend.Appearance.Dimensions.Width = 75;

    Hope this will help.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top