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

Is there anyway to create data for ChartView based on PivotGrid

5 Answers 86 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
TuDN
Top achievements
Rank 1
TuDN asked on 08 Jun 2017, 08:37 AM

Hello there,

I watched demo about RadChartView integration but unfortunately the source code of the most important part (create SeriesSource for Chart) did not provide. So how can I get the sorted rows, columns and build datasource for Chart manually? Thank for you help!

5 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 12 Jun 2017, 04:31 PM
Hi Tu Do Ngoc,

We have a great example how to visualize the summarized by RadPivotGrid data in RadChartView in our QSF demos: http://demos.telerik.com/wpf/ -> PivotGrid->RadChartView Integration example.

Regards,
Polya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
TuDN
Top achievements
Rank 1
answered on 16 Jun 2017, 09:55 AM

Hello Polya

Thank for your quick reply

As I mentioned in my #1 post, I still don't know how to get filtered data from PivotGrid and build 'SeriesSource' data for RadCartesianChart (as RadChartView Integration demo). If you open RadChartView Integration demo and view code, you will understand what I say.

0
Polya
Telerik team
answered on 21 Jun 2017, 08:55 AM
Hello Tu Do Ngoc,

In order to generate and get the source used for the series of the RadChartView we've created a PivotChartViewModel that populates its SeriesSource property from the provided DataProvider. Currently this is the only available way to extract this information.

In order to obtain the grouped, filtered and summarized result from the DataProvider, you can create a custom LocalDataSourceProvider and add a new property MyResults that returns the protected property Results (of type IPivotResults) of its base class. You can find the generated groups hierarchically through the MyResults.Root property and you can extract the AggregateValue for a specific row and column group using the MyResults.GetAggregateResult(aggregateIndex, rowGroup, columnGroup) method.

Hope t his helps.

Regards,
Polya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Avi
Top achievements
Rank 1
answered on 22 Nov 2017, 12:42 AM
Where is this demo?  It is not in the SDK example browser
0
Martin Ivanov
Telerik team
answered on 22 Nov 2017, 07:48 AM
Hello Avi,

You can find the RadChartView Integration example in the demos app. You can download the app from here: https://demos.telerik.com/wpf/. Then open it and type "RadChartView integration" in the search box. 

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PivotGrid
Asked by
TuDN
Top achievements
Rank 1
Answers by
Polya
Telerik team
TuDN
Top achievements
Rank 1
Avi
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or