|
|
/*This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License UsageThis file may be used under the terms of the GNU General Public License version 3.0 aspublished by the Free Software Foundation and appearing in the file LICENSE included in thepackaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales departmentat http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25*/Ext.data.JsonP.Ext_grid_PivotGrid({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.grid.GridPanel","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a><div class='subclass '><a href='#!/api/Ext.Component' rel='Ext.Component' class='docClass'>Ext.Component</a><div class='subclass '><a href='#!/api/Ext.BoxComponent' rel='Ext.BoxComponent' class='docClass'>Ext.BoxComponent</a><div class='subclass '><a href='#!/api/Ext.Container' rel='Ext.Container' class='docClass'>Ext.Container</a><div class='subclass '><a href='#!/api/Ext.Panel' rel='Ext.Panel' class='docClass'>Ext.Panel</a><div class='subclass '><a href='#!/api/Ext.grid.GridPanel' rel='Ext.grid.GridPanel' class='docClass'>Ext.grid.GridPanel</a><div class='subclass '><strong>Ext.grid.PivotGrid</strong></div></div></div></div></div></div></div><h4>Files</h4><div class='dependency'><a href='source/PivotGrid.html#Ext-grid-PivotGrid' target='_blank'>PivotGrid.js</a></div></pre><div class='doc-contents'><p>The PivotGrid component enables rapid summarization of large data sets. It provides a way to reduce a large set of\ndata down into a format where trends and insights become more apparent. A classic example is in sales data; a company\nwill often have a record of all sales it makes for a given period - this will often encompass thousands of rows of\ndata. The PivotGrid allows you to see how well each salesperson performed, which cities generate the most revenue, \nhow products perform between cities and so on.</p>\n\n\n<p>A PivotGrid is composed of two axes (left and top), one <a href=\"#!/api/Ext.grid.PivotGrid-cfg-measure\" rel=\"Ext.grid.PivotGrid-cfg-measure\" class=\"docClass\">measure</a> and one <a href=\"#!/api/Ext.grid.PivotGrid-cfg-aggregator\" rel=\"Ext.grid.PivotGrid-cfg-aggregator\" class=\"docClass\">aggregation</a>\nfunction. Each axis can contain one or more dimension, which are ordered into a hierarchy. Dimensions on the \nleft axis can also specify a width. Each dimension in each axis can specify its sort ordering, defaulting to \"ASC\", \nand must specify one of the fields in the <a href=\"#!/api/Ext.data.Record\" rel=\"Ext.data.Record\" class=\"docClass\">Record</a> used by the PivotGrid's \n<a href=\"#!/api/Ext.data.Store\" rel=\"Ext.data.Store\" class=\"docClass\">Store</a>.</p>\n\n\n<pre><code>// This is the record representing a single sale\nvar SaleRecord = <a href=\"#!/api/Ext.data.Record-static-method-create\" rel=\"Ext.data.Record-static-method-create\" class=\"docClass\">Ext.data.Record.create</a>([\n {name: 'person', type: 'string'},\n {name: 'product', type: 'string'},\n {name: 'city', type: 'string'},\n {name: 'state', type: 'string'},\n {name: 'year', type: 'int'},\n {name: 'value', type: 'int'}\n]);\n\n// A simple store that loads SaleRecord data from a url\nvar myStore = new <a href=\"#!/api/Ext.data.Store\" rel=\"Ext.data.Store\" class=\"docClass\">Ext.data.Store</a>({\n url: 'data.json',\n autoLoad: true,\n reader: new <a href=\"#!/api/Ext.data.JsonReader\" rel=\"Ext.data.JsonReader\" class=\"docClass\">Ext.data.JsonReader</a>({\n root: 'rows',\n idProperty: 'id'\n }, SaleRecord)\n});\n\n// Create the PivotGrid itself, referencing the store\nvar pivot = new <a href=\"#!/api/Ext.grid.PivotGrid\" rel=\"Ext.grid.PivotGrid\" class=\"docClass\">Ext.grid.PivotGrid</a>({\n store : myStore,\n aggregator: 'sum',\n measure : 'value',\n\n leftAxis: [\n {\n width: 60,\n dataIndex: 'product'\n },\n {\n width: 120,\n dataIndex: 'person',\n direction: 'DESC'\n }\n ],\n\n topAxis: [\n {\n dataIndex: 'year'\n }\n ]\n});\n</code></pre>\n\n\n<p>The specified <a href=\"#!/api/Ext.grid.PivotGrid-cfg-measure\" rel=\"Ext.grid.PivotGrid-cfg-measure\" cla
|