Setting up the dhis2/analytics app for local development

I am working on some development for the DHIS2 UI, and I would like to set up the DHIS2/UI for my local development environment. Specifically, I want to test some functionality on the data visualizer. How can I link the two codebases so that changes made in the DHIS2/UI reflect on the data visualizer app?

cc: @Gassim @hendrik @kpvandivier,


Hi @abdimohammed

I believe it’d be the same process as creating a new app. You can fork the Data Visualizer app repository and then follow the same steps as linking the app to ‘localhost’ for dev purposes (Environment Setup | DHIS2 Developer Portal).

Check out the read-me instructions in the repository: GitHub - dhis2/data-visualizer-app: DHIS2 Data Visualizer App

Hope this helps!

Thanks for replying @Gassim .
I have already setup the data visualizer app for my local development. However, I would like to setup the @dhis2/ui app so that I can tweak it for it to be used with the data visualizer app.
The data visualizer app depends on the dhis2/ui for the frontend components ie dhis2/ui is added as a dependency in the data visualizer app.
My question is, how do I setup up the @dhis2/ui to work with the data visualizer?


Okay, I think I understand your question now. Thanks for the clarification. You’ll need to use yarn in the same app directory to install the dependency. As explained in DHIS2 UI Library | DHIS2 Developer Portal

To get started using the DHIS2 UI library, navigate to your project and add @dhis2/ui as a dependency:

yarn add @dhis2/ui

Hi @Gassim,
How do I make changes the the dhis2/analytics app for my local development?


Hello @edoardo,
Kindly assist me in setting up @dhis2/analytics for my local development.


Hi @abdimohammed : the analytics repo is available here: GitHub - dhis2/analytics: Shared components and modules for building DHIS 2 analytics apps.
If you’d like, you can fork it and run it locally.

If you have suggestions for improving the functionality for the analytics library, perhaps you’d like to open a feature request in our Jira (DHIS 2 Software - Issues - Jira)?

Thanks @tzemp ,
I would like to run it locally. I have already forked the repo. How do I configure it locally? I would like to know how to link it with the data visualizer app for local development.


Hi @abdimohammed,

at the moment we don’t have documentation on how to contribute to the analytics library codebase.
It is considered an internal library used by the analytics apps.

If you have a specific issue you’d like to see fixed and you think the problem is in the analytics library, you can open a ticket in JIRA about it.


Hi @edoardo, Thanks for letting me know.


1 Like