Skip to content
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: implement cumulative values in PT engine (DHIS2-5497) #1567

Merged
merged 10 commits into from
Dec 14, 2023

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Aug 25, 2023

Implements DHIS2-5497

Relates to dhis2/data-visualizer-app#2746

Published in 26.2.0-cumulative-values-alpha.1


Key features

  1. accumulate values horizontally when cumulativeValues option is checked
  2. add example in Storybook

Description

Similarly to the option for other vis types, values in a pivot table can be accumulated horizontally.
This behaviour is controlled by the cumulativeValues option in DV.


TODO

  • address XXX comments after code review

Screenshots

Data before accumulating the values horizontally:
Screenshot 2023-11-13 at 14 42 24

Same data with accumulation:
Screenshot 2023-11-13 at 14 43 48

@edoardo edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from 1d1f3f2 to d4717d9 Compare September 1, 2023 13:50
@edoardo edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from d4717d9 to 23a460a Compare October 23, 2023 13:14
@edoardo edoardo marked this pull request as ready for review October 24, 2023 07:37
@edoardo edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from 7581c12 to 621d992 Compare November 10, 2023 15:17
This solves formatting issues, like right alignment, caused by the
default type being TEXT.
This is needed for the cumulative values feature, so empty cells can be
set to 0 or to the accumulated value.
Needed for the cumulative values feature.
This is to accommodate the accumulated value which might need a wider cell.
The cell size is computed based on the rendered value.
Refactored and moved some code around to allow getRaw() to return
cumulative values, thus fixing the sorting which uses getRaw() to sort
the rows/columns.
@edoardo edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from 2dbc2aa to 0705358 Compare December 7, 2023 13:30
Copy link
Collaborator

@janhenrikoverland janhenrikoverland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally Austin should review, but can be done later.

@edoardo edoardo changed the title feat: implement cumulative values in PT engine DHIS2-5497 feat: implement cumulative values in PT engine (DHIS2-5497) Dec 14, 2023
@edoardo edoardo merged commit 2b404b4 into master Dec 14, 2023
7 checks passed
@edoardo edoardo deleted the feat/pt-cumulative-values-DHIS2-5497 branch December 14, 2023 14:07
dhis2-bot added a commit that referenced this pull request Dec 14, 2023
# [26.2.0](v26.1.8...v26.2.0) (2023-12-14)

### Features

* implement cumulative values in PT engine (DHIS2-5497) ([#1567](#1567)) ([2b404b4](2b404b4))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 26.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants