jQuery pivot customized grid

In this example:

  1. We add 3 new formula based columns for year, quarter and month from Shipped Date.

    Purpose of adding these new columns is to group/pivot the same column data by different intervals.

  2. We use pivotCM event to create a new colModel from the auto generated colModel during pivoting. In the new colModel, 2nd last row is replaced by last row i.e., sum(Freight).