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: offline exporting [DHIS2-17722] #1731

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

HendrikThePendric
Copy link
Contributor

@HendrikThePendric HendrikThePendric commented Nov 14, 2024

Implements DHIS2-17722

Relates to dhis2/data-visualizer-app#3135


Key features

  1. Adds the offline exporting module to Highcharts so we can use the Chart. exportChartLocal() method
  2. Adds a fix for offline PDF export that addresses a font issue that would occur when supplying a pdfFont for non-latin text, when no actual non ASCII text was actually encountered in the chart. This occurs in DV when a user has a non-latin locale, but the metadata in the chart has not been translated
  3. Adds another fix for PDF export when the chart uses text shadow. This part can be removed once we upgrade to Highcharts v11, because the bug has been resolved there.
  4. Addresses a PDF export bug in the Single Value vis-type. In the default view we use a lighter font-weight but this is not supported in PDF and that would cause the text to render in a serif font-type.

TODO

  • Get in touch with highcharts support to resolve the failing scatter plot chart PDF export and resolve this issue. Our scatter plot is blank when exporting to PDF, i.e. see "ANC: Dropout rate v Coverage per district", but the example on the Highcharts website works fine.
  • Set the background color for all charts to white when exporting. Currently the Single Value vis-type has a transparent background and this is making the PNG exports look wrong
  • Once fix: upgrade Highcharts from v10 to v11 #1728 is merged, remove the bugfix for text-shadow, since this bugfix already comes bundled with highcharts v11.

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.

1 participant