How do I pass an ObservableCollection<KeyValuePair<double,string>> to a PieChart? #437
-
Hello, i am struggling with a way to fill my PieCharts with an ObservableCollection<KeyValuePair<double,string>>. I couldn't find the right information in the sample folder. This is my code: ` public ObservableCollection<KeyValuePair<double, string>> GetEmployeeGenders()
I tried this:
but it didnt work. How can I solve my problem? I will also need to give each gender a specific color in my PieChart. Thanks for the help!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you haven't solved your issue, here is an example how to populate PieChart using Linq:
and
This example returns chart with two sections. You can adjust it by removing "if else" statement in Name |
Beta Was this translation helpful? Give feedback.
If you haven't solved your issue, here is an example how to populate PieChart using Linq:
and