Wijmo Olap Aggregate in js

Posted by: mavensupport on 10 January 2019, 12:58 pm EST

    • Post Options:
    • Link

    Posted 10 January 2019, 12:58 pm EST

    Is it possible to pivot the data of a wijmo pivot grid in javascript. I am currently slicing the pivot table via the pivot panel but is it possible to achieve the same thing with javascript. I would like to be able to calculate the pivots within code.

    I know that I can use the filter and getAggregate, but this only returns single value and not a pivot grid.

    data_filter = data.filter(data => data.ColumnName == 'ColumnValue')
    wijmo.getAggregate(wijmo.Aggregate.Sum, data_filter, 'FieldName')
    

    Do you have any example of how this can be achieved. Thanks

  • Posted 11 January 2019, 2:22 am EST

    Hi,

    At the core, PivotEngine is used to generate pivot views for the PivotGrid. PivotPanel control just lets the user configure the pivot engine via UI. If you would like to do it programmatically you may create and assign an instance of PivotEngine to PivotGrid and then customize different properties of the PivotEngine to generate views as required.

    Please refer to the following sample for more:

    https://demos.wijmo.com/5/PureJS/LearnWijmo/LearnWijmo/#sL7whktg

    API reference:

    https://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.olap.PivotEngine.Class.html

    ~Sharad

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels