← Back to team overview

dhis2-users team mailing list archive

Embed viz in DHIS2 2.22

 

Hello,
I've a DHIS2 2.22 running with some chart we did. I want to embed one in an
external page. When I ask for "Embed" I got code like this:

<html>
<head>
<link rel="stylesheet" href="
http://dhis2-cdn.org/v222/ext/resources/css/ext-plugin-gray.css"; />
<script src="http://dhis2-cdn.org/v222/ext/ext-all.js";></script>
<script src="http://dhis2-cdn.org/v222/plugin/chart.js";></script>
</head>
<body>
<div id="chart1" style="width:700px; height:400px"></div>
<script>

Ext.onReady(function() {

DHIS.getChart({
  "id": "nIn1JofuIm3"
});

});
</script>
</body>
</html>

I get several problems there - first of all on the CDN the v222 does not
exists at all. Going on http://dhis2-cdn.org/ looks like nothing exists
between 2.21 & 2.25.

The second thing is I don't understand how this can work without any
reference to the server I'm running on.

I did some test in the play with success, but that's with the 2.25 (and
looks like a quite different API). Any help for a version between 2.21 &
2.25?

Thanks,

Martin

-- 
*Martin Van Aken - **Freelance Enthusiast Developer*

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken <http://twitter.com/martinvanaken>
Call me on Skype : vanakenm
Hang out with me : martin@xxxxxxxxxxxxxxxx
Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken
Company website : www.joyouscoding.com