How to Embed charts and Maps in to external site

Hi everyone,

I want to embed charts and maps in my another site. How we can use this features ?

2 Likes

Hi

Have you checked out the user manual?

Regards
Calle

2 Likes

I have tried following. But not working

2 Likes

@John_Francis_Mukulu or @ismail do you have any guidance on this?

2 Likes

Still not get any solution

2 Likes

Hi Parveen,

As it is mentioned in this post, dhis2-cdn.org is not working. you should download that chart.js file from the instance you are getting the chart from (e.g. https://play.dhis2.org/2.30/dhis-web-visualizer/chart.js) as It couldn’t be referenced directly from the script tag (security issues).
and one last thing you need to make sure of, is check if your browser web security is disabled else it will block you from accessing dhis2 resources.

3 Likes

Hello @Panchal
If you’re referring to portal use case as in https://play.dhis2.org/portal/

There’s a bit of challenges with former plugins due to changes in format of returned analytics api results, which don’t conform exactly to structure is expected.

We tried to develop simplified public portal, which essentially allows you to expose few dashboards that you may want public, in which you can create an account with limited privileges and give it access to those dashboard. and public portal can use that account to publish the dashboard you’ve curated for public use.

The public web portal can be found here:
https://play.dhis2.org/appstore/app/J9yml33NsRL

4 Likes

I recently documented my experience in troubleshooting this frustrating issue on JIRA. The documentation is entirely wrong and it would save other developers/implementers/users a lot of time and headache if it was just removed or updated.

https://jira.dhis2.org/browse/DHIS2-7130

EDIT: I have resolved my issue and have succesffuly embedded some test charts. Feel free to contact me if you need assistance.

2 Likes