This question is locked. New answers and comments are not allowed.
I am new to telerik products, currently evaluating your latest RadControls. I've looked for a good sample on how to data bind to a RadPieChart but have not found one. So I'd appreciate any help.
I would like to replace our current use of the SL toolkit PieChart with the RadPieChart. All our uses bind the pie chart defined in the xaml with a dictionary type, typically using <string, decimal> definition. Where string(the key) is the pie label an decimal (the value) is the corresponding value. I am looking for an easy example on how to do this with RadPieChart
Here's a typical example of using the SL toolkit pie chart (slightly customized):
First the xaml:
<customControls:LabeledPieChart x:Name="minsPieChart" Title="Invoice Cost Breakdown" Height="Auto" Width="Auto" BorderBrush="DarkGray" Margin="5">
<customControls:LabeledPieChart.Series>
<customControls:LabeledPieSeries ItemsSource="{Binding}"
DependentValuePath="Value"
IndependentValuePath="Key"
Palette="{StaticResource MyPalette}"
IsSelectionEnabled="False"
PieChartLabelStyle="{StaticResource pieChartLabelStyle}" LabelDisplayMode="Connected">
</customControls:LabeledPieSeries>
</customControls:LabeledPieChart.Series>
</customControls:LabeledPieChart>
In the code behind, I simply set the binding by
I would like to replace our current use of the SL toolkit PieChart with the RadPieChart. All our uses bind the pie chart defined in the xaml with a dictionary type, typically using <string, decimal> definition. Where string(the key) is the pie label an decimal (the value) is the corresponding value. I am looking for an easy example on how to do this with RadPieChart
Here's a typical example of using the SL toolkit pie chart (slightly customized):
First the xaml:
<customControls:LabeledPieChart x:Name="minsPieChart" Title="Invoice Cost Breakdown" Height="Auto" Width="Auto" BorderBrush="DarkGray" Margin="5">
<customControls:LabeledPieChart.Series>
<customControls:LabeledPieSeries ItemsSource="{Binding}"
DependentValuePath="Value"
IndependentValuePath="Key"
Palette="{StaticResource MyPalette}"
IsSelectionEnabled="False"
PieChartLabelStyle="{StaticResource pieChartLabelStyle}" LabelDisplayMode="Connected">
</customControls:LabeledPieSeries>
</customControls:LabeledPieChart.Series>
</customControls:LabeledPieChart>
In the code behind, I simply set the binding by
Dictionary<string, decimal> MyCostValues;minsPieChart.DataContext = MyCostValues
...
How would I do the same with using RadPieChart control ?
Thank you.
Cliff.