-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(TreeData): add optional Aggregators to Tree Data grids #1074
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- add the possibility to use the same Aggregators that are used in Grouping, however all Aggregators had to be modified to support tree data which has a few differences - also note that when Aggregators are used with Grouping then the aggregation are under a separate row with `__groupTotals` details... however on Tree Data it will have its totals under `__treeTotals` and also directly on the parent item - currently only 5 Aggregators are supported with Tree Data: Avg, Sum, Min, Max and Count - also note that AvgAggregator will automatically give you "avg", "count" and "sum", so if the user needs all 3 then it is a lot better to use Avg for better perf. The other reason why calling Avg+Sum will give you worst perf is that each aggregation is separate and will redo the item count and sum work for each aggregators, so it is better to simply use Avg instead of Avg+Sum
Codecov Report
@@ Coverage Diff @@
## master #1074 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 244 245 +1
Lines 16564 16798 +234
Branches 5933 6030 +97
==========================================
+ Hits 16564 16798 +234
|
- added a new flag to disable cell format auto-detection that is causing issues when having multiple text+numbers in same cell which the auto-detect doesn't work correctly with, the new flag will be used with the following: `excelExportOptions: { autoDetectCellFormat: false }` and that is the same options for both column and/or grid options.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
__groupTotals
details... however on Tree Data it will have its totals under__treeTotals
and also directly on the parent itemFormatters.treeParseTotals
that can be used to parse and auto-detect when to useGroupTotalFormatters
or regularFormatter
, user must also provide atreeTotalsFormatter
orgroupTotalsFormatter
Formatters
andGroupTotalFormatters
, it will auto-detect if it has__treeTotals
then it will use theGroupTotalFormatters
or else it will try to use regularFormatters
.TODOs
autoDetectCellFormat
flag to Excel Export Options #1083 to add a new flag in order to disable auto-detection of cell formatsuppressAggFilteredOnly
or column flaggroupAggFiltering
true
will show full total, whilefalse
will only show filtered data totalslickgrid-universal/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts
Line 196 in 07efeb6
below is an example with both Avg and Sum Aggregators displayed