← Back to team overview

dhis2-devs team mailing list archive

Re: Embedding charts with the visualizer chart plug-in Not Working

 

Hi Jan,

I am using http://apps.dhis2.org/portal/chart.html as reference. This page
is not working because it is giving following error:

TypeError: r.filter is undefined

conf.filter = r.filter.toLowerCase();

I was also getting same error when I copied the page source of above page.

Then I removed all DHIS.getChart() functions, for predefined charts and
started using dynamic charts as follows

In javascript I am using

function setLinks() {

DHIS.getChart({ el: 'chartB1', url: base,
    type: 'bar',
    indicators: ['FnYCr2EAzWS','eTDtyyaSA7f','tUIlpyeeX9N'],
    periods: 'last12Months',
    organisationunits: ['ImspTQPwCqd']
  });

}

So I am getting error as

"NetworkError: 404 Not Found -
http://apps.dhis2.org/demo/api/chartValues.jsonp?in=FnYCr2EAzWS&in=eTDtyyaSA7f&in=tUIlpyeeX9N&last12Months=true&ou=ImspTQPwCqd&callback=Ext.data.JsonP.callback1
".


I had one more doubt. I want to create maps for selected Organisation Unit,
Indicator and relative period. I tried looking at
http://www.dhis2.org/doc/snapshot/en/user/html/ch25s14.html page, but links
of maps are not working on this page. I want to user something similar to "
http://apps.dhis2.org/demo/api/maps/data?in=JIVMtpjVZqJ&ou=O6uvpzGd5pu"; but
I want to send period as parameter along with this.

Please let me know How can I do this?

Follow ups

References