Skip to content

Commit

Permalink
feat: implement data icon option for SV visualization (DHIS2-10496) (#…
Browse files Browse the repository at this point in the history
…2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.
  • Loading branch information
edoardo committed Oct 23, 2023
1 parent 31a2dec commit 58a6f10
Showing 1 changed file with 429 additions and 434 deletions.
Loading

0 comments on commit 58a6f10

Please sign in to comment.