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

RadChart - Label Appearance Wrap Text

1 Answer 111 Views
Chart
This is a migrated thread and some comments may be shown as answers.
PCR
Top achievements
Rank 1
PCR asked on 31 Aug 2013, 08:36 AM
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

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Sep 2013, 06:22 AM
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.
Tags
Chart
Asked by
PCR
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or