quick-pivot icon indicating copy to clipboard operation
quick-pivot copied to clipboard

Support Multiple Aggregation Dimensions

Open jrweinb opened this issue 7 years ago • 10 comments

It would be great to have the type of functionality seen in this Pivot component:

Webix Pivot Component

Here, both GDP and OIL are aggregation dimensions, with configurable aggregators. I tried forking the library and working on it on my own, but I was unable to get it working on first pass. Any suggestions or recommendations on where to focus? Thanks!

jrweinb avatar May 11 '18 17:05 jrweinb

Most of the business logic is located in src/logic, so that's likely where you would poke around. Is it possible to do the configurable aggregators using the callback function? You have access to each of the aggregation fields in that callback function so you could configure any aggregations that you wanted

pat310 avatar May 12 '18 02:05 pat310

@pat310 Thanks for your input! So I am able to use the callback function to do exactly what you suggest, but the results are hard to understand when rendered without column headers (from a UX perspective). Its definitely a workable solution, but I would prefer to create a feature where you could give an array of aggregation dimensions and a flag to show/hide column headers for each aggregation.

I am currently working on adding the new columns in createColumnHeaders and I will see where that gets me.

jrweinb avatar May 14 '18 15:05 jrweinb

@pat310 - I got this working, but I need to do a lot of refactoring and test writing before I would submit a PR. It accepts an array of aggregationDimensions and create column headers for each aggregation under its parent. Below is a rendering of my pivot table, where the input array of aggDimensions is: ['value1', 'value2']

screen shot 2018-05-21 at 5 21 51 pm

I am also going to work on different types of aggregations for each aggregation dimension once this is complete. I will send another update when I have made more progress

jrweinb avatar May 21 '18 21:05 jrweinb

Wow looks great so far!

On Mon, May 21, 2018 at 5:23 PM, jrweinb [email protected] wrote:

@pat310 https://github.com/pat310 - I got this working, but I need to do a lot of refactoring and test writing before I would submit a PR. It accepts an array of aggregationDimensions and create column headers for each aggregation under its parent. Below is a rendering of my pivot table, where the input array of aggDimensions is: ['value1', 'value2']

[image: screen shot 2018-05-21 at 5 21 51 pm] https://user-images.githubusercontent.com/424662/40330610-7d0ed1fe-5d1b-11e8-91a7-26c9d942d46f.png

I am also going to work on different types of aggregations for each aggregation dimension once this is complete. I will send another update when I have made more progress

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pat310/quick-pivot/issues/75#issuecomment-390787200, or mute the thread https://github.com/notifications/unsubscribe-auth/ALpZGD8UciJ8yX3h_SXNo8aUlxLpruNmks5t0zBRgaJpZM4T70MF .

pat310 avatar May 22 '18 01:05 pat310

@jrweinb Looks really good. Any possibility of having this feature merged?

rmdort avatar Aug 07 '18 14:08 rmdort

If a PR is made for it, I'll merge it in

pat310 avatar Aug 08 '18 01:08 pat310

@jrweinb Do you have fork of a working version that supports multiple agg? Care to share?

rmdort avatar Aug 09 '18 07:08 rmdort

@jrweinb I know it's old now but could you share your code for this? I have to code the same functionality and it would be great to have your code to Strat from

Thanks!

fmq avatar Jun 13 '19 11:06 fmq

@jrweinb Could you share your code, please? Thank you

lovelyelfpop avatar May 20 '20 08:05 lovelyelfpop

@jrweinb @fmq I have to code the same functionality too!, any news ? :)

Gydunhn avatar Aug 26 '20 13:08 Gydunhn