-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: compute totals and cumulative values for numeric/boolean types r…
…especting totalAggregationType (DHIS2-9155) (#1700) * fix: accumulate numeric (not PERCENTAGE, UNIT_INTERVAL) and boolean values This makes the cumulative values feature more in line with the way totals are computed. The difference is that there is no accumulation for PERCENTAGE and UNIT_INTERVAL types as these don't accumulate with a simple sum. * fix: allow totals for all numeric/boolean, respect totalAggregationType For row totals where 1 or more columns have a non-numeric/boolean data element, N/A is returned for the total cell. For column totals, the totalAggregationType of the data element is used to compute the total value. * fix: style N/A differently than a normal value * feat: allow custom title for cells Normally the title is the same as the cell's content. When cumulative values are used it help to see the original value in the title and the accumulated value in the cell. It's also useful to give some more info about a particular value (ie. N/A). * fix: avoid to show 0 for non cumulative types when cumulative is enabled * refactor: replace ||= operator, not transformed by Babel * fix: fix regression for DHIS2-17297 * fix: always use "Value:" prefix in cell tooltip * fix: handle better mixed values when accumulating * fix: do not fill the table with N/A with cumulative values Simply render the original value for non cumulative types. The tooltip can be used when in doubt to know if a cell value is accumulated. * fix: only accumulate when total agg type is SUM --------- Co-authored-by: Jan Henrik Øverland <[email protected]>
- Loading branch information
1 parent
b478ff0
commit a2bfd20
Showing
7 changed files
with
134 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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