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

Problem by legend location

3 Answers 87 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
SCT
Top achievements
Rank 1
SCT asked on 11 Jul 2011, 03:41 PM

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

3 Answers, 1 is accepted

Sort by
0
SCT
Top achievements
Rank 1
answered on 12 Jul 2011, 07:32 AM
....here's the files
0
Giuseppe
Telerik team
answered on 14 Jul 2011, 08:22 AM
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!

0
SCT
Top achievements
Rank 1
answered on 14 Jul 2011, 10:25 AM
Hi Giuseppe,

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

Kind regards,
SCT
Tags
Chart (Obsolete)
Asked by
SCT
Top achievements
Rank 1
Answers by
SCT
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or