Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:pivotdescription [2014/02/10 14:55] tony |
wiki:pivotdescription [2014/02/10 15:32] tony |
||
---|---|---|---|
Line 30: | Line 30: | ||
+ | ===== Using jqPivotGrid ===== | ||
+ | |||
+ | jqPivotGrid inherits the jqGrid, so you can use most of the features you are already \\ | ||
+ | familiar with: column resizing, formatter, cell renderers, row/cell events etc. \\ | ||
+ | The jqPivotGrid can be used when you want to get summation and pivot features that aren’t \\ | ||
+ | provided in the jqGrid. | ||
+ | |||
+ | To break down the dataset into categories and country, you just have to configure the x and y Dimentions: \\ | ||
+ | |||
+ | <code javascript> | ||
+ | xDimension : [{ | ||
+ | dataName: 'CategoryName' | ||
+ | }], | ||
+ | yDimension : [ { | ||
+ | dataName: 'Country' | ||
+ | }] | ||
+ | </code> | ||
+ | |||
+ | Multiple levels are supported, so you can just specify them in the y and x Dimensions. \\ | ||
+ | Grouping the rows and/or columns is done automatically when two or more levels are set in \\ | ||
+ | xDimension and/or yDimension. | ||
+ | |||
+ | Now that you broke down the dataset on the y and x Dimension, it’s time to aggregate \\ | ||
+ | the cell values. Several kinds of aggregations are available including: \\ | ||
+ | sum, min, max, count etc. Future release will provide your own aggregation function. | ||
+ | |||
+ | <code javascript> | ||
+ | |||
+ | aggregates : [{ | ||
+ | member : 'Price', | ||
+ | aggregator : 'sum', | ||
+ | width:50, | ||
+ | label:'Sum' | ||
+ | },{ | ||
+ | member : 'Quantity', | ||
+ | aggregator : 'count', | ||
+ | width:50, | ||
+ | label: 'Count' | ||
+ | }] | ||
+ | </code> |