EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: ahybits on January 20, 2017, 07:36:50 AM



Title: Pivot to always count
Post by: ahybits on January 20, 2017, 07:36:50 AM
I have a Pivot Grid with the following setup:
Code:
      pivot:{
                rows:['Team'],
                columns:['Factor'],
                values:[
                    {field:'Username',op:'count'}
                ]
            },

When I use the layout, if I put anything else in the Values, it always sets it to Sum.
How can it so that no matter what field is put into values that it will always do a Count instead of a Sum


Title: Re: Pivot to always count
Post by: stworthy on January 21, 2017, 04:00:33 AM
Please set the 'defaultOperator' property to 'count'. Make sure to download the newest plugin from http://www.jeasyui.com/extension/pivotgrid.php