Hello,
Does anyone know how to use the source as xamPivotDataSelector, for xamPieChart? I've done it with xamDataChart but with xamPieChart i´m not getting positive results. The examples I have seen are all created with a class in C # (Data Model) and are ad hoc. My application is all in XAML, so I wanted to do this in the same language without using C #. Is it possible? Thank you
sseixas
Hello Yohan,
Thank you for your post. I have been looking into it and I modified the sample Peter has uploaded, so now it works correctly. Basically I changed the way the DataSource’s ResultChanged event was handled.
Hope this helps you.
Hi Petar,
Thanks for providing the code. However when i try to run the project i get an error saying
Error 1 Cannot implicitly convert type 'System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs>' to 'System.EventHandler<Infragistics.Olap.ResultChangedEventArgs>'
Below is the error line of code.
pivotGrid.DataSource.ResultChanged += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(DataSource_ResultChanged);
Can you help me out.
Regards,
Yohan
Hi sseixas,
I am really glad to hear that. If you don’t have any further questions on the matter, please verify the thread as answered so other users can find it more easily and take advantage of it as well.
Hello Petar Monov
Excelente response. Thanks.
It´s great fine :-)
Best Regards
Hello sseixas,
Excuse me for the late reply, I had to investigate this more thoroughly and was finally able to create a sample project (PivotAndChart.zip) that does what you want. What I did was to register for the XamPivotGrid’s DataSource’s ResultChanged event, and in its handler dynamically create an ObservableCollection that can be used for the XamPieChart:
Please let me know if you require any further clarification on the matter.