Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:pivotdescription [2014/02/10 14:42]
tony
wiki:pivotdescription [2017/12/12 17:23]
admin
Line 5: Line 5:
 Simple we can say that pivot table is a program tool that allows you to reorganize and summarize \\  Simple we can say that pivot table is a program tool that allows you to reorganize and summarize \\ 
 selected columns and rows of data in a spreadsheet or database table to obtain a desired report. \\ selected columns and rows of data in a spreadsheet or database table to obtain a desired report. \\
-A pivot table doesn'​t actually change the spreadsheet or database itself. In database lingo, to \\+A pivot table doesn'​t actually change the spreadsheet or database itself. In database lingo, to \\ 
 pivot is to turn the data to view it from different perspectives. pivot is to turn the data to view it from different perspectives.
  
Line 21: Line 21:
   - What are the order amounts of each category?   - What are the order amounts of each category?
   - What are the order amounts of each in a specific country?   - What are the order amounts of each in a specific country?
-  - What are the order amounts and quantity of each category ​product ​product in specific country and their totals?+  - What are the order amounts and quantity of each category ​and product in specific country and their totals?
  
 You could use jqPivotGrid to create those reports, and this is how they would look: You could use jqPivotGrid to create those reports, and this is how they would look:
Line 27: Line 27:
 {{:​wiki:​amtbycategory.png|}} {{:​wiki:​amtbycategory.png|}}
 {{:​wiki:​amtbycountry.png|}} {{:​wiki:​amtbycountry.png|}}
 +{{:​wiki:​amtbycatprod.png|}}
 +
 +
 +===== 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 are not \\
 +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>​
 +
 +As you have probably noticed in the above example, you could aggregate multiple data \\
 +fields, say "​Price"​ and "​Quantity"​. You can easily achieve this by configuring all \\
 +required aggregations.
 +
 +{{:​wiki:​amtbycatprod.png|}}
 +
 +Showing the grand totals for rows and/or columns is pretty easy to configure \\
 +("​rowTotals:​ true" or "​colTotals:​ true"​). The group totals are also available \\ 
 +via rowTotals or colTotals configs. ​
 +
 +
 +The pivot grid uses JSON data as data source. In the future we will extend it so \\
 +that we can read any data source. \\
 +
 +===== Future =====
 +
 +Since jqPivotGrid is a open source product, it will constantly be improved with new features. \\
 +Feel free to make this happen.

QR Code
QR Code wiki:pivotdescription (generated for current page)