fix: upgrade to analytics with highcharts major version bump and address regressions #3288
+16
−34
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.
ISSUE WAS PUT ON HOLD DUE TO KFMT FINDINGS
No issue nr available
Requires: dhis2/analytics#1728
This PR is blocked
See KFMT Finding for more details, but the following points are blocking this PR:
At the time of writing we are using a GitHub commit URL for @dhis2/analytics, once the above PR is merged we can switch to a regular NPM version number.
Key features
Description
After the upgrade, we found an issue with the height of the chart: it would not fill the container but set the default 400px height. After discussing the problem with @edoardo we found that removing some code that we used to scale the chart fixed the issue. Quite likely, there was some interference between Highchart's auto-scaling and ours.
KFMT findings
During KFMT two critical issues emerged. Although a workaround exists for both of these bugs, we decided it would be better to put this PR on hold.
Highcharts v11 is incompatible with Batik
Highcharts uses
feDropShadow
, which is a valid SVG element but is not supported by Batik. This problem was also reported in [a Highcharts issue] (highcharts/highcharts#21557) by someone else, and a workaround solution was suggested. However, for us to implement this workaround would be quite messy since the CSS part would be in DV and the rest of the workaround in @dhis2/analytics. Besides this, there ongoing work in dhis2/analytics#1731 and #3135 to switch to Highcharts offline-export module for exports and once this is completed we do not need to rely on Batik anymore, making this problem irrelevant.There is a bug in highcharts related to scatterplots with the boost module
We've reported the bug highcharts/highcharts#22183 and decided we would wait for it to be resolved before proceeding. We did come up with a workaround though: we could merge all data-points to a single series and style each point individually, as in this example.
TODO
Known issues