Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我们可以在extjs中为pivot grid的两列上创建自定义聚合函数吗?_Extjs_Highcharts_Pivot Table_Extjs5_Pivot Grid - Fatal编程技术网

我们可以在extjs中为pivot grid的两列上创建自定义聚合函数吗?

我们可以在extjs中为pivot grid的两列上创建自定义聚合函数吗?,extjs,highcharts,pivot-table,extjs5,pivot-grid,Extjs,Highcharts,Pivot Table,Extjs5,Pivot Grid,根据pivot.js代码 * @param {Array} records Records to process. * @param {String} measure Field to aggregate by. * @param {Ext.pivot.matrix.Base} matrix The matrix object reference. * @param {String} rowGroupKey Key of the left axis item.

根据pivot.js代码

* @param {Array} records Records to process.
     * @param {String} measure Field to aggregate by.
     * @param {Ext.pivot.matrix.Base} matrix The matrix object reference.
     * @param {String} rowGroupKey Key of the left axis item.
     * @param {String} colGroupKey Key of the top axis item.
     *
     * @return {Number}
     */
    sum: function(records, measure, matrix, rowGroupKey, colGroupKey) {
        var length = records.length,
            total  = 0,
            i;

        for (i = 0; i < length; i++) {
            total += Ext.Number.from(records[i].get(measure), 0);
        }

        return total;
    }
*@param{Array}记录要处理的记录。
*@param{String}要聚合的度量值字段。
*@param{Ext.pivot.matrix.Base}matrix是矩阵对象引用。
*@param{String}rowGroupKey左轴项的键。
*顶部轴项的@param{String}colGroupKey键。
*
*@return{Number}
*/
sum:函数(记录、度量、矩阵、rowGroupKey、colGroupKey){
var length=records.length,
总计=0,
我
对于(i=0;i
如何在此基础上为pivot grid的两列创建自定义聚合函数