-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grouping (subtotals) #1088
base: master
Are you sure you want to change the base?
Grouping (subtotals) #1088
Conversation
Thanks for this PR! A few questions:
|
ad 1.
Subtotal is code of 700 lines while me is around 20 added to the main code.
My version
- introduces a compact layout i.e. rows are displayed in narrower space.
Check the example.
- works for both heatmap and barchart functions from the main code.
- can have subtotals before or after the data cells
- passes Jasmin tests
ad 2.
Gives subtotals for the graph if needed. I can return all rows/cols or only
those with pure data.
niedz., 24 lut 2019 o 19:52 Nicolas Kruchten <[email protected]>
napisał(a):
… Thanks for this PR!
A few questions:
1. How is this different from Subtotal.js?
2. Does this have any applicability other than for a table-like
renderer, i.e. graphs?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF_cDhqd5iykF7WseapazB86LcF5crqPks5vQt9agaJpZM4bOsRq>
.
|
OK, thanks for those answers. I'm hesitant to merge these changes into the main library as that means I will have to maintain them for the next few years, so I'll need to think about it a bit. One other possibility... It looks like the changes you've made are in |
This is basically how things started with Subtotal.js btw, after I added the See: #506 |
Rows and columns folding. As for your comment about |
Will this ever make it into the next release? |
Added grouping of data with minimal changes in the main code. If new options are not activated code behaves as nothing is changed. With or without new options code passes all Jasmin tests.
Changes:
grouping
causes the insertion of group columns and rows like subtotalrowGroupBefore
andcolGroupBefore
controls whether grouping is before or after the data cells. Default torowGroupBefore
true
andcolGroupBefore
false
rendererOptions.table.compactLayout
turns the rows headers in to hierarchical structure. This option works only ifgrouping
is set and defaults totrue
.New example
pivot() with grouping and compact layout
added toexamples/index.html
Also few styling entries added to
pivot.css
to control grouping rendering.