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

axis labels overflow

10 Answers 115 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Anatoly Chekh
Top achievements
Rank 1
Anatoly Chekh asked on 04 Jan 2011, 01:11 PM
  Hello!

I have a question.
If I have labels with long text then they will be overflow legend and also will be paint outside chart area (see attachment).
How can I fix this?

Thanks, Anatoly Chekh.

10 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 05 Jan 2011, 10:26 AM
Hi Anatoly,

At present, there is no easy way to address this issue. You can manually reset the text, however there is no option for the control to detect that the text would overflow some of the elements of the chart.

Regards,
Yavor
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Prakash
Top achievements
Rank 1
answered on 14 Sep 2011, 04:59 PM
Hi,

We've run into the same problem. The axis labels don't just overlap other elements within the chart, but extend beyond the chart's boundary as well. We cannot manually reset the text as we just provide the data points to the chart axis and rely on the chart rendering to be sized to it's bounds. Are there any fixes or workarounds for this issue?

Thanks,
Prakash
0
Sia
Telerik team
answered on 14 Sep 2011, 05:14 PM
Hi Prakash,

There are two possible options:

1. You can add padding to the ChartArea
2. or set different LabelRotationAngle to the axis as shown in this example.

I hope that one of these two is applicable for your scenario.

All the best,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Prakash
Top achievements
Rank 1
answered on 14 Sep 2011, 05:26 PM
Hi,

Thanks for the response. However, neither would be an effective workaround for us. The Y axis label extends quite a bit away from the chart border, so setting a padding to account for this would result in the chart display area being shrunk.  I've attached an image showing the overlap on the Y axis. We're having the problem in both vertical for Y and inclined angles on X axis.

Prakash
0
Sia
Telerik team
answered on 15 Sep 2011, 01:54 PM
Hi Prakash,

Can you please open a support ticket and send us a project reproducing your issue, because the result shown in the your screen-shot does not appear to be the same as the one which was discussed earlier.

Best wishes,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Duncan
Top achievements
Rank 1
answered on 07 Oct 2011, 12:15 AM
I'm having this same problem: labels not only flowing outside the chart but outside the pane that the chart is sitting in. This is pretty bad... controls shouldn't be able to do that.
0
Sia
Telerik team
answered on 07 Oct 2011, 11:35 AM
Hello Duncan,

Can you please send us a picture showing your exact scenario so we can give you some specific advice that will help you?

Thank you,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Duncan
Top achievements
Rank 1
answered on 09 Oct 2011, 11:29 PM
Here's a screenshot of the scenario. Obviously it's a slightly contrived example, as applying the correct number formatting makes this a lot better (but not completely), but it shows the problem very clearly. The expected output in this case would be the label getting cut off at the edge of the chart.

The visual structure is, from outside to in: RadSplitContainer, RadPaneGroup, RadPane, Grid, RadChart. As you can see in the screenshot, the chart is somehow drawing the label on top of everything, stepping outside the bounds of even the split container, only stopping when it hits the browser border.

At the moment we're working around it with generous padding and label rotation, but there's the (minor) looming concern that depending on the data it might not work. I'm not worries about getting a proper solution right now, but considering that there are others with this issue it would be nice if this was fixed properly at some point in the future.
0
Sia
Telerik team
answered on 12 Oct 2011, 01:34 PM
Hi Duncan,

Thank you for the provided information. What I can suggest is to put your RadChart in a ClipPanel or a panel with clipping so that you can be sure that the content of RadChart won't go outside it.

Kind regards,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Duncan
Top achievements
Rank 1
answered on 12 Oct 2011, 11:02 PM
Ah, that seems a reasonable workaround. Thanks.
Tags
Chart
Asked by
Anatoly Chekh
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Prakash
Top achievements
Rank 1
Sia
Telerik team
Duncan
Top achievements
Rank 1
Share this question
or