[]
        
(Showing Draft Content)

Pivot Engine

The PivotEngine class is at the core of wijmo.olap. It tabulates data in the itemsSource collection. The PivotEngine uses a combination of fields and field lists to define views and summarize the data.

Building and Defining Views

To build a view, add fields to one or more of the PivotEngine's field list.

let ng = new wjOlap.PivotEngine({
    autoGenerateFields: false,
    itemsSource: data
});

ng.rowFields.push('person');
ng.columnFields.push('date');
ng.valueFields.push('amount');

Performance

The PivotEngine is fast. When used with client-side data, it can summarize data sets with hundreds of thousands of records in fractions of a second (especially when using modern browsers).

Even on slow browsers and large data sets, the PivotEngine generates summaries asynchronously, so the UI is never blocked.

In most client-side scenarios, data set size is limited by the time it takes to download or generate the raw data, not by the time it takes to summarize it.