Problem by legend location

Thread is closed for posting
4 posts, 0 answers
  1. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 11 Jul 2011 Link to this post

    Dear Telerik Team,

     

    we have problem by RadChart legend positioning. Here is our code:

     

                radChart.ClearSkin();

                radChart.Skin = skin;

                radChart.AutoLayout = true;

                radChart.PlotArea.Appearance.Dimensions.Width = 500;

                radChart.PlotArea.Appearance.Position.AlignedPosition = AlignedPositions.Left;

                radChart.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;

                radChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 45;

                radChart.PlotArea.XAxis.Appearance.LabelAppearance.CompositionType = LabelItemsCompositionTypes.RowImageText;

                radChart.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Top;

                radChart.Appearance.TextQuality = TextQuality.ClearTypeGridFit;

                radChart.PlotArea.XAxis.AutoScale = true;

                radChart.PlotArea.XAxis.IsZeroBased = false;

                radChart.Appearance.Border.Visible = false;

                radChart.Legend.Appearance.ItemTextAppearance.MaxLength = 20;

                radChart.Legend.Appearance.Position.AlignedPosition = AlignedPositions.Right;

                radChart.SeriesOrientation = ((RadChartEntity)Session[radChart.ID]).Orientation;

     

     

    and the problem occurs always by skin change, e.g. by changing “Web20” skin type to “Black” skin type (or vice-versa). Result can be seen in first two attachments. Similar situation rises when ChartSeriesType property is changed (e.g. from line to points). The result by ChartSeriesType property change can be seen at the last attachment.

     

    Can you help us, please?

     

    Thank you very much.

     

    Kind Regards,

    SCT

  2. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 12 Jul 2011 Link to this post

    ....here's the files
  3. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 14 Jul 2011 Link to this post

    Hi Sct,

    Indeed there seems to be a problem with the legend positioning in this specific scenario -- as a workaround we would suggest you to set the AlignedPosition to TopRight instead and it should work as expected (the control will still interpret this as "Right" as when AutoLayout is enabled the actual supported positions are "Top", "Bottom", "Left", and "Right" only).


    Kind regards,
    Giuseppe
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  4. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 14 Jul 2011 Link to this post

    Hi Giuseppe,

    thank you very much for the explanation as well as for the attached solution. It works.

    Kind regards,
    SCT
Back to Top