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: avoid crash in DV with some chart types (DHIS2-15882) #1582

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Sep 27, 2023

Implements DHIS2-15882

Relates to https://github.com/dhis2/data-visualizer-app/pull/XXX


Key features

  1. use new object structure for legendItem

Description

Highcharts changed the internal structure of the legendItem object from version 10.3.1.

Before there were 3 properties: legendItem, legendSymbol and legendGroup.
Now legendItem contains label (previously legendItem), group (previously legendGroup) and (apparently) symbol (previously legendSymbol).

We use this internal object for handling custom legend symbols.
This fixes the crash in DV when using certain chart types (column, stacked column, bar, stacked bar).

TODO

  • figure out why the legend symbol is not rendered
  • figure out why when trying to replicate the issue with a simple example legendItem is different than what we see in DV app where legendSymbol is still present and legendItem contains only group and label

Known issues

  • the legend symbol is not rendered solved here

Screenshots

Before:
Screenshot 2023-09-27 at 12 21 49

After:
Screenshot 2023-09-27 at 15 30 30

@edoardo edoardo marked this pull request as ready for review September 27, 2023 13:37
@martinkrulltott martinkrulltott self-assigned this Sep 27, 2023
@edoardo edoardo merged commit f6c89e1 into master Sep 28, 2023
7 checks passed
@edoardo edoardo deleted the fix/dv-chart-crash-DHIS2-15882 branch September 28, 2023 09:06
dhis2-bot added a commit that referenced this pull request Sep 28, 2023
## [26.0.21](v26.0.20...v26.0.21) (2023-09-28)

### Bug Fixes

* avoid crash in DV with some chart types DHIS2-15882 ([#1582](#1582)) ([f6c89e1](f6c89e1))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 26.0.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

@janhenrikoverland janhenrikoverland changed the title fix: avoid crash in DV with some chart types DHIS2-15882 fix: avoid crash in DV with some chart types (DHIS2-15882) Oct 20, 2023
jenniferarnesen added a commit that referenced this pull request Apr 3, 2024
)

* fix: avoid crash in DV with some chart types DHIS2-15882 (#1582)

* fix: upgrade highcharts to be compatible with code change

---------

Co-authored-by: Edoardo Sabadelli <[email protected]>
dhis2-bot added a commit that referenced this pull request Apr 3, 2024
## [24.10.5](v24.10.4...v24.10.5) (2024-04-03)

### Bug Fixes

* avoid crash in DV with some chart types (DHIS2-15882) [24.x] ([#1651](#1651)) ([68907d2](68907d2)), closes [#1582](#1582)
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