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

Updated Telerik to current version, Labels no longer show

1 Answer 54 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Iron
Steven asked on 09 Sep 2016, 01:58 PM

we have recently updated to the current Telerik version from a 2013 version.  We have the following

 

<telerik:RadPieChart Palette="Windows8" Grid.Column="0" Grid.Row="0" ToolTip="Mill Department">

  <telerik:RadPieChart.Series>

    <telerik:PieSeries ValueBinding="CountOfMachines" ShowLabels="True" ItemsSource="{Binding MachinesUsedYesterByCustomerInMill}" RadiusFactor="0.35">

       <telerik:PieSeries.LabelDefinitions>

          <telerik:ChartSeriesLabelDefinition Binding="Customer" Margin="-8,0,0,0">

               <telerik:ChartSeriesLabelDefinition.Template>

                    <DataTemplate>

                         <StackPanel>

                             <TextBlock Text="{Binding DataItem.Customer}" Margin="0"/>

                       </StackPanel>

                  </DataTemplate>

              </telerik:ChartSeriesLabelDefinition.Template>

          </telerik:ChartSeriesLabelDefinition>

       </telerik:PieSeries.LabelDefinitions>

     </telerik:PieSeries>

   </telerik:RadPieChart.Series>

</telerik:RadPieChart>

 

_______________

Before the upgrade this worked fine, now the chart still comes out, but no labels are on it.  What needs to change to have the labels show up now?

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 13 Sep 2016, 02:00 PM
Hi Steven,

Looking at the provided code snippet we can see that you have set the Binding property of the ChartSeriesLabelDefinition and you have set a custom DataTemplate to the Template property . You can try two approaches.

You can try removing the Binding property of the ChartSeriesLabelDefinition
<telerik:ChartSeriesLabelDefinition Binding="Customer"  Margin="-8,0,0,0">

OR

You can remove the DataItem. from the binding of the Text property.
<TextBlock Text="{Binding}" Margin="0"/>

Give these two approaches a try and let us know if they work for you.

Regards,
Dinko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Chart
Asked by
Steven
Top achievements
Rank 1
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or