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

Wrapping of X axis labels

10 Answers 337 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manishkumar
Top achievements
Rank 1
Manishkumar asked on 07 Jul 2011, 01:02 PM
Hi,

Please let me know how to wrap the labels under the bar as the values overlaps on the next label when it has more number of characters.

Thanking you.

10 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 07 Jul 2011, 02:33 PM
Hello Manishkumar,

Use the PlotArea.XAxis.AxisLabel.Appearance.RotationAngle property to rotate the labels so they do not overlap. Another option is to increase the plotting step, so that the axis labels are shown through a bigger step.To do this, set the XAxis AutoScale property to false and use the MinValue/MaxValue and Step properties.

Regards,
Steve
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
Manishkumar
Top achievements
Rank 1
answered on 07 Jul 2011, 04:30 PM
Hi Steve,

Thanks for replying. Rotating the labels is one option, but if the text is too large, it will cut or will not show up. Is there any way to make them wrap or to split the labels when it has spaces?
0
Steve
Telerik team
answered on 07 Jul 2011, 04:36 PM
Hello Manishkumar,

There are no other options than the one suggested in my previous post. if the labels are too long to fit even when rotated, you can increase the bottom margin of the PlotArea so that they fit. Generally setting the AutoLayout property of the chart to true should take care of this automatically.
If that does not suit you, you can always resort to the second suggestion, namely decreasing the number of Xaxis labels.

All the best,
Steve
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
Ananth
Top achievements
Rank 1
answered on 20 Jul 2012, 07:59 AM
Hi,

I am also facing the same issue. Is LabelFitMode="Multiline" property available in RadAjax Control chart?

Thanks
0
Steve
Telerik team
answered on 24 Jul 2012, 08:32 AM
Hi Ananth,

There is no such property in the reporting chart item, but if you're already using another chart component/control, then you might consider saving it as an image and displaying it inside the report via the PictureBox report item. A sample project showing such approach can be found here: Use asp:chart in Telerik Reports.

Greetings,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Rachel Carvalho
Top achievements
Rank 1
answered on 08 Feb 2013, 11:35 AM
Well, I had the same problem, and while it would fit me to rotate the labels, I found that rotated text rendering was unusable, there was no alias at all.

So, I tried to send the text already wrapped and it worked. My label now says
label = "Two\r\nWords";
and it works like a charm, it renders wrapped. The only thing now is that it's not centralized, but definitely looks better than those rotated labels that look as if they've been rendered by MS Paint.

Cheers,
Rachel Carvalho
0
s
Top achievements
Rank 1
answered on 11 Nov 2015, 04:51 PM

Hi,

I am facing a similar kind of issue.I tried both rotating the labels and increasing spacingslotcount. When I tried rotating,if the labels are long,the bar graph in graph wizard is shrinking.The same is with the later.Is there any way that we can ​rotate label without effecting the graph or set ​graph height and label height separately so the graph size remains same even if label size increases.Please let me know if there is any way that we can avoid text overlap if labels are next to each other in a graph wizard or any tooltip that can show full name if cut labels to 20 characters.I am attaching a picture for better reference.Please check and let me know.

Thanks,

Suchitra Bandi

0
Stef
Telerik team
answered on 12 Nov 2015, 03:02 PM
Hello Suchitra,

Based on your screenshot, you are using a CategoryScale, thus labels can be formatted through the Graph - CategoryGroups - Label property by an expression like
= Replace(Fields.GroupName,' ','
')
The replacement is a new line instead of blank space.

I hope this helps you.

Regards,
Stef
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
s
Top achievements
Rank 1
answered on 13 Nov 2015, 03:57 PM

Hi Stef,

When i tried the replace function,either the graph is not shown completely or the y axis labels are turning out to be 0 with no graph shown.Any idea why that is happening or do you know any other way for textwrapping the x-axis labels.May be like textwrap or i s there any way that i could format the labels text by custom formatting etc.I am attaching a picture for better reference.Please check and let me know.

Thanks,

Suchitra Bandi

0
Stef
Telerik team
answered on 18 Nov 2015, 10:29 AM
Hi Suchitra,

Please compare your settings to these of the attached demo report. The report can be previewed with the Standalone Designer tool. The report uses connection to AdventureWorks database.


If you need further help, please post the report's designer.cs(vb) file's content and sample data, allowing us to test the settings locally.

Regards,
Stef
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Manishkumar
Top achievements
Rank 1
Answers by
Steve
Telerik team
Manishkumar
Top achievements
Rank 1
Ananth
Top achievements
Rank 1
Rachel Carvalho
Top achievements
Rank 1
s
Top achievements
Rank 1
Stef
Telerik team
Share this question
or