Is there anyway to create data for ChartView based on PivotGrid

4 posts, 0 answers
  1. TuDN
    TuDN avatar
    6 posts
    Member since:
    Dec 2016

    Posted 08 Jun Link to this post

    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!

  2. Polya
    Admin
    Polya avatar
    238 posts

    Posted 12 Jun Link to this post

    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.
  3. TuDN
    TuDN avatar
    6 posts
    Member since:
    Dec 2016

    Posted 16 Jun Link to this post

    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.

  4. Polya
    Admin
    Polya avatar
    238 posts

    Posted 21 Jun Link to this post

    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.
Back to Top