Labels are clipped

5 posts, 0 answers
  1. A
    A avatar
    6 posts
    Member since:
    Apr 2012

    Posted 04 Apr 2012 Link to this post

    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
  2. Sia
    Admin
    Sia avatar
    667 posts

    Posted 09 Apr 2012 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. A
    A avatar
    6 posts
    Member since:
    Apr 2012

    Posted 10 Apr 2012 Link to this post

    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.


  5. A
    A avatar
    6 posts
    Member since:
    Apr 2012

    Posted 10 Apr 2012 Link to this post

    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?
  6. Sia
    Admin
    Sia avatar
    667 posts

    Posted 13 Apr 2012 Link to this post

    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 >>

Back to Top
UI for WPF is Visual Studio 2017 Ready