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

XAxis Labels Overlap

1 Answer 111 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 31 Mar 2009, 10:16 PM
Hi all,

I have a Rad Chart (horizontal bar chart) control on a page and when the control renders with my data (34 bars), the labels are all scrunched together and it looks terrible.

I have tried setting AutoLayout="true", but it doesn't appear to do anything.

Here's my code:

ASPX:

                    <telerik:RadChart ID="chtResults"
                        Skin="WebBlue"
                        AutoLayout="true"
                        SeriesOrientation="Horizontal"
                        runat="server">
                    </telerik:RadChart>

CODE BEHIND:

                Telerik.Charting.ChartSeries Series = new Telerik.Charting.ChartSeries();
                Series.DataYColumn = "Subscriber Count";
                Series.Name = "Count";

                chtResults.Series.Add(Series);
                chtResults.PlotArea.XAxis.DataLabelsColumn = "Feed";

                chtResults.DataSource = dtReportDataTable;
                chtResults.DataBind();


Any ideas how I can get the Telerik Rad Chart control to correctly render?

Any help is greatly appreciated.

Jason




1 Answer, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 03 Apr 2009, 06:04 AM
Hi Jason,

There are two options to change this behavior;
1. Decrease  the number of labels by setting theradChart1.PlotArea.XAxis.LabelStep, but since you bind the labels to the datasource, that will not do the trick (I just mention this option for you to have in mind in other cases).

2. The other option (the only one applicable in your case) is to rotate the labels, so that they take less space:
radChart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -90;

Kind regards,
Evtim
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Jason
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Share this question
or