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

fix: separator for hundreds, thousands and millions is missing in the Pie charts (DHIS2-16172) #1677

Merged
merged 6 commits into from
Jun 12, 2024

Conversation

martinkrulltott
Copy link
Contributor

@martinkrulltott martinkrulltott commented Jun 10, 2024

Implements DHIS2-16172

Relates to dhis2/data-visualizer-app#3093


Key features

  1. export ’separateDigitGroups’ to be reused for pie
  2. format pie data labels properly with thousand separator and decimal handling

Description

The value now has a thousand separator, e.g. 1000 -> 1 000. The decimals are intact for the value, e.g. 1000,01 -> 1 000,01

The percentage now renders without a trailing zero, e.g. 100,0 -> 100. This only affects zeros, so real decimal values will still be rendered (rounded to 1 decimal point), e.g. 100,12 -> 100,1


TODO

  • Manual testing
  • Fix bug with 1234.5678 outputting as 1 234.5 678

Screenshots

before, no thousand separator for value, percentage has trailing zero

image

after, adds thousand separator for value, no percentage trailing zero

image

@martinkrulltott martinkrulltott requested a review from edoardo June 10, 2024 09:47
@martinkrulltott martinkrulltott marked this pull request as draft June 10, 2024 10:35
@martinkrulltott martinkrulltott marked this pull request as ready for review June 10, 2024 10:49
@martinkrulltott martinkrulltott merged commit ad8c799 into master Jun 12, 2024
5 checks passed
@martinkrulltott martinkrulltott deleted the fix/DHIS2-16172-pie-labels branch June 12, 2024 10:06
dhis2-bot added a commit that referenced this pull request Jun 12, 2024
## [26.7.2](v26.7.1...v26.7.2) (2024-06-12)

### Bug Fixes

* separator for hundreds, thousands and millions is missing in the Pie charts (DHIS2-16172) ([#1677](#1677)) ([ad8c799](ad8c799))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 26.7.2 🎉

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