← Back to team overview

dhis2-devs team mailing list archive

Re: Embedding charts with the visualizer chart

 

 plug-in Not Working
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=089e0115f5a48dda6304e5f0c7c6

--089e0115f5a48dda6304e5f0c7c6
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Thank you Jan.

I will try this and get back to you if I have any issues.

Sent from my Windows Phone
From: Jan Henrik =C3=98verland
Sent: 09-09-2013 12:23
To: Namrata Nehete
Cc: DHIS 2 developers
Subject: Re: [Dhis2-devs] Embedding charts with the visualizer chart
plug-in Not Working
On Mon, Sep 9, 2013 at 1:12 PM, Jan Henrik =C3=98verland <
janhenrik.overland@xxxxxxxxx> wrote:

> The visualizer plugin is now up to date in trunk, so you have to use the
> dev server. Have a look here for a working example in about 20 minutes:
> http://localhost:8080/dhis-web-visualizer/app/plugin.html
>

Should be http://apps.dhis2.org/dev/dhis-web-visualizer/app/plugin.html not
localhost :)


>
> The map parameter example in the documentation is misleading as it is
> currently supported on mapViews only (representing a single layer in GIS)=
.
> Example:
> http://apps.dhis2.org/demo/api/mapViews/data?in=3DUvn6LCg7dVU&ou=3DImspTQ=
PwCqd Unfortunately,
> periods can not be configured at the moment.
>
> In 2.13 there will be a fully configurable GIS plugin available.
>
>
>
>
> On Sun, Sep 8, 2013 at 2:38 PM, Namrata Nehete <n.nehete@xxxxxxxxx> wrote=
:
>
>> 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 =3D 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=3DFnYCr2EAzWS&in=3De=
TDtyyaSA7f&in=3DtUIlpyeeX9N&last12Months=3Dtrue&ou=3DImspTQPwCqd&callback=
=3DExt.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=3DJIVMtpjVZqJ&ou=3DO6uvpzGd5=
pu"
>> but I want to send period as parameter along with this.
>>
>> Please let me know How can I do this?
>>
>>
>>
>>
>

--089e0115f5a48dda6304e5f0c7c6
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head><meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Cont=
ent-Type"></head><body><div><div style=3D"font-family: Calibri,sans-serif; =
font-size: 11pt;">Thank you Jan.<br><br>I will try this and get back to you=
 if I have any issues.<br><br>Sent from my Windows Phone<br></div></div><hr=
><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weigh=
t: bold;">From: </span><span style=3D"font-family: Tahoma,sans-serif; font-=
size: 10pt;">Jan Henrik =C3=98verland</span><br><span style=3D"font-family:=
 Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">Sent: </span><span=
 style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">09-09-2013 12:2=
3</span><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;=
 font-weight: bold;">To: </span><span style=3D"font-family: Tahoma,sans-ser=
if; font-size: 10pt;">Namrata Nehete</span><br><span style=3D"font-family: =
Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">Cc: </span><span st=
yle=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">DHIS 2 developers<=
/span><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; f=
ont-weight: bold;">Subject: </span><span style=3D"font-family: Tahoma,sans-=
serif; font-size: 10pt;">Re: [Dhis2-devs] Embedding charts with the visuali=
zer chart plug-in Not Working</span><br><br></body></html><div dir=3D"ltr">=
<br><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Mon, S=
ep 9, 2013 at 1:12 PM, Jan Henrik =C3=98verland <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:janhenrik.overland@xxxxxxxxx"; target=3D"_blank">janhenrik.over=
land@xxxxxxxxx</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"ltr">The visualizer plugin is now up to date i=
n trunk, so you have to use the dev server. Have a look here for a working =
example in about 20 minutes:=C2=A0<a href=3D"http://localhost:8080/dhis-web=
-visualizer/app/plugin.html" target=3D"_blank">http://localhost:8080/dhis-w=
eb-visualizer/app/plugin.html</a></div>

</blockquote><div><br></div><div>Should be=C2=A0<a href=3D"http://apps.dhis=
2.org/dev/dhis-web-visualizer/app/plugin.html">http://apps.dhis2.org/dev/dh=
is-web-visualizer/app/plugin.html</a>=C2=A0not localhost :)<br></div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-s=
tyle:solid;padding-left:1ex">

<div dir=3D"ltr"><div>
<br></div><div>The map parameter example in the documentation is misleading=
 as it is currently supported on mapViews only (representing a single layer=
 in GIS). Example:=C2=A0<a href=3D"http://apps.dhis2.org/demo/api/mapViews/=
data?in=3DUvn6LCg7dVU&amp;ou=3DImspTQPwCqd" target=3D"_blank">http://apps.d=
his2.org/demo/api/mapViews/data?in=3DUvn6LCg7dVU&amp;ou=3DImspTQPwCqd</a>=
=C2=A0Unfortunately, periods can not be configured at the moment.</div>


<div><br></div><div>In 2.13 there will be a fully configurable GIS plugin a=
vailable.</div><div><br></div><div><br></div></div><div class=3D""><div cla=
ss=3D"h5"><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On =
Sun, Sep 8, 2013 at 2:38 PM, Namrata Nehete <span dir=3D"ltr">&lt;<a href=
=3D"mailto:n.nehete@xxxxxxxxx"; target=3D"_blank">n.nehete@xxxxxxxxx</a>&gt;=
</span> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"ltr"><div><div>Hi Jan,<br><br></div>I am using=
 <a href=3D"http://apps.dhis2.org/portal/chart.html"; target=3D"_blank">http=
://apps.dhis2.org/portal/chart.html</a> as reference. This page is not work=
ing because it is giving following error:<br>




<br>TypeError: r.filter is undefined<br>=C2=A0=C2=A0=C2=A0 <br>conf.filter =
=3D r.filter.toLowerCase();<br><br>I was also getting same error when I cop=
ied the page source of above page. <br><br>Then I removed all DHIS.getChart=
() functions, for predefined charts and started using dynamic charts as fol=
lows<br>




<br>In javascript I am using <br><br>function setLinks() {<br><br>DHIS.getC=
hart({ el: &#39;chartB1&#39;, url: base,<br>=C2=A0=C2=A0=C2=A0 type: &#39;b=
ar&#39;,<br>=C2=A0=C2=A0=C2=A0 indicators: [&#39;FnYCr2EAzWS&#39;,&#39;eTDt=
yyaSA7f&#39;,&#39;tUIlpyeeX9N&#39;],<br>




=C2=A0=C2=A0=C2=A0 periods: &#39;last12Months&#39;,<br>=C2=A0=C2=A0=C2=A0 o=
rganisationunits: [&#39;ImspTQPwCqd&#39;]<br>=C2=A0 });<br><br>}<br><br></d=
iv>So I am getting error as <span><br><br>&quot;NetworkError:
 404 Not Found -=20
<a href=3D"http://apps.dhis2.org/demo/api/chartValues.jsonp?in=3DFnYCr2EAzW=
S&amp;in=3DeTDtyyaSA7f&amp;in=3DtUIlpyeeX9N&amp;last12Months=3Dtrue&amp;ou=
=3DImspTQPwCqd&amp;callback=3DExt.data.JsonP.callback1" target=3D"_blank">h=
ttp://apps.dhis2.org/demo/api/chartValues.jsonp?in=3DFnYCr2EAzWS&amp;in=3De=
TDtyyaSA7f&amp;in=3DtUIlpyeeX9N&amp;last12Months=3Dtrue&amp;ou=3DImspTQPwCq=
d&amp;callback=3DExt.data.JsonP.callback1</a>&quot;.<br>




<br><br></span><div><table cellpadding=3D"0" cellspacing=3D"0"><tbody><tr><=
td>I had one more doubt. I want to create maps for selected Organisation Un=
it, Indicator and relative period. I tried looking at <a href=3D"http://www=
.dhis2.org/doc/snapshot/en/user/html/ch25s14.html" target=3D"_blank">http:/=
/www.dhis2.org/doc/snapshot/en/user/html/ch25s14.html</a> page, but links o=
f maps are not working on this page. I want to user something similar to &q=
uot;<a href=3D"http://apps.dhis2.org/demo/api/maps/data?in=3DJIVMtpjVZqJ&am=
p;ou=3DO6uvpzGd5pu" target=3D"_blank">http://apps.dhis2.org/demo/api/maps/d=
ata?in=3DJIVMtpjVZqJ&amp;ou=3DO6uvpzGd5pu</a>&quot; but I want to send peri=
od as parameter along with this.<br>




<br>Please let me know How can I do this?<br> </td><td><a><pre title=3D"con=
f.filter =3D r.filter.toLowerCase();"><br><br></pre></a></td></tr></tbody><=
/table></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>

--089e0115f5a48dda6304e5f0c7c6--


Follow ups