RadChart - Label Appearance Wrap Text

2 posts, 0 answers
  1. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2013

    Posted 31 Aug 2013 Link to this post

    Hi Team,

    I have implemented a RadChart with the type "PieChart" and applied the LabelsAppearance Position as "Circle". The DataField label string is used in the control.

    The problem I am facing is when the text in the "DataField label" is too long, the text appeared on the Pie Chart cuts off.
    I need to Wrap up the label text appeared on the Chart. Is there a way to Wrap the DataField label in Telerik radChart.?

    Telerik Version: 2013.2.611.35 

    The below given is the sample code to show the RadChart.
    (E.x)

          <telerik:RadHtmlChart RegisterWithScriptManager="true" ID="RadHtmlChart1" runat="server"
                               Skin="Vista" Width="650px" Height="450px" Transitions="true" EnableEmbeddedScripts="true"
                               InvokeLoadData="OnPageLoad" RenderMode="Lightweight" EnableAjaxSkinRendering="true">
                               <ChartTitle Text="Alerts">
                               </ChartTitle>
                               <Appearance FillStyle-BackgroundColor="White">
                               </Appearance>
                               <PlotArea>
                                   <Series>
                                       <telerik:PieSeries DataFieldY="Value" ColorField="Color" ExplodeField="IsExploded"
                                           NameField="Details">
                                           <LabelsAppearance DataField="Details" Position="Circle" >
                                           </LabelsAppearance>

                                       </telerik:PieSeries>
                                   </Series>
                               </PlotArea>                         
                           </telerik:RadHtmlChart>

    Please refer the screenshot attached. Please do the needs.

    Thanks in Advance
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3596 posts

    Posted 04 Sep 2013 Link to this post

    Hello Robert,

    SVG itself (which is what RadHtmlChart uses to render) does not support line breaks. What I can suggest at this point is using the tooltips to show the long values and placing a truncated (or otherwise shortened) information in the labels.
    You can use this page to track the progress of the research on adding line breaks in SVG.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft banner
Back to Top