Skip to content Skip to sidebar Skip to footer

Is There Any Way To Set The Sequence Of The Column Of Pivot In Pivottable.js?

I want to create the pivot table in my website. So I've used the pivottable.js for creating the pivot table. I'm able to create the pivot table using the following JS, but not able

Solution 1:

Yes, you can use the sorters configuration option. Something like

sorters: {"type": $.pivotUtilities.sortAs(["Emp2", "Emp1"])}

Or in general you can just pass in any old comparator:

sorters: {"type": function(a,b){ return string_a.localeCompare(string_b) }

Post a Comment for "Is There Any Way To Set The Sequence Of The Column Of Pivot In Pivottable.js?"