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

Labels are clipped

4 Answers 147 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
A
Top achievements
Rank 1
A asked on 04 Apr 2012, 08:26 AM
I have a problem with the bar chart - when label is wider then the bar, then part of the label is clipped. Please see screenshot attached. Also in a pie chart labels are almost always clipped on the right and left sides

4 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 09 Apr 2012, 08:39 AM
Hi,

Thank you for the provided screenshots. There are a couple of properties that you can play with, to see if you can configure the chart to display the labels per your requirement. For example:
  • Reduce the LabelOffset of the series definition
  • Reduce the RadiusFactor of the series definition
  • Use Horizontal Bar Series definition instead of vertical one. Since the space is limited - horizontal bars might be a better solution to start with.
In case these properties do not help you get the desired result, I would suggest that you hide the series item labels and enable the tooltips for the items - http://www.telerik.com/help/silverlight/radchart-features-tooltips.html. You can additionally use LegendDisplayMode=DataPointLabel and show all item labels in the Legend of the chart.

Greetings,
Sia
the Telerik team

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

0
A
Top achievements
Rank 1
answered on 10 Apr 2012, 12:41 PM
Thank you for the answer and advise. I already have tooltips but labels are required as well.

Unfortunately I can not use HorizontalBarChart. But I've found 'partial solution' - when attaching snoop to my application and set margins of PART_DragZoomLayer and Part_LabelsPanel to (10, 0, 10, 0) and for PART_AxisX (5,0,5,0) I get expected behavior. Now I need to hook this settings to the Style to get acceptable result.

As for pie chart, it looks like there is bug with label placement - pie chart leaves some space around, and when changing charts width I can see that labels position is changed. I can make it wide enough to fit all labels, but when width reaches some min width labels starts to being clipped but their position is not changed.


0
A
Top achievements
Rank 1
answered on 10 Apr 2012, 02:10 PM
Ok, for the bar chart i've ended with copying templates for ChartArea and AxisX2D and adding Margin where appropriate.

I still dont know what to do with the pie chart. What is the easiest way to 'tweak' layout logic for the labels?
0
Sia
Telerik team
answered on 13 Apr 2012, 08:21 AM
Hello,

Please send us a small runnable application reproducing your problem and we will modify it if possible to work as you need. Thank you in advance.

Regards,
Sia
the Telerik team

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

Tags
ChartView
Asked by
A
Top achievements
Rank 1
Answers by
Sia
Telerik team
A
Top achievements
Rank 1
Share this question
or