Web API Pivot Table Layout

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

image

Yet I would like the Pivot Table to have a layout like this :

image

Regards

···

Farai Mutero


Farai Mutero

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.

image

image

···

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Thanks Jan for the feedback. Noted.

The following querystring parameters "tableLayout=true&columns=dx;ou&rows=pe" found in the Web API documentation just provided what I was looking for :

api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu**&tableLayout=true&columns=dx;ou&rows=pe**

image

image

···

One more question : If I setup a chart using the Data Visualizer and I have saved it as “favourite”, how do I call that chart favourite from my html report passing a dynamic org unit parameter to it?

Regards

Farai

On Wed, Jul 24, 2013 at 7:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.


Farai Mutero

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Farai,

If you look in the second table on this page, you will see that there is a dynamic parameter called ou:

http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u

image

image

···

On Wed, Jul 24, 2013 at 8:07 PM, Farai Mutero fmutero@gmail.com wrote:

Thanks Jan for the feedback. Noted.

The following querystring parameters "tableLayout=true&columns=dx;ou&rows=pe" found in the Web API documentation just provided what I was looking for :

api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu**&tableLayout=true&columns=dx;ou&rows=pe**

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

One more question : If I setup a chart using the Data Visualizer and I have saved it as “favourite”, how do I call that chart favourite from my html report passing a dynamic org unit parameter to it?

Regards

Farai

On Wed, Jul 24, 2013 at 7:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.


Farai Mutero

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Sorry, I misread your question a bit. In your case, you can only pass width and height if you wish to work with stored charts, like this:
http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u/data?width=300&height=400

image

image

···

On Wed, Jul 24, 2013 at 8:35 PM, Knut Staring knutst@gmail.com wrote:

Hi Farai,

If you look in the second table on this page, you will see that there is a dynamic parameter called ou:

http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, Jul 24, 2013 at 8:07 PM, Farai Mutero fmutero@gmail.com wrote:

Thanks Jan for the feedback. Noted.

The following querystring parameters "tableLayout=true&columns=dx;ou&rows=pe" found in the Web API documentation just provided what I was looking for :

api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu**&tableLayout=true&columns=dx;ou&rows=pe**

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

One more question : If I setup a chart using the Data Visualizer and I have saved it as “favourite”, how do I call that chart favourite from my html report passing a dynamic org unit parameter to it?

Regards

Farai

On Wed, Jul 24, 2013 at 7:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.


Farai Mutero

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

So that means I can’t pass dynamic uid parameters then? Such a facility would have greatly assisted me to quickly create my html report leveraging off the charts already created and saved as favourites in the Data Visualizer. I would only need to dynamically pass the uid to it and get the relevant result. Now looks like I will have to reconstruct the charts from scratch?

image

image

···

On Wed, Jul 24, 2013 at 8:42 PM, Knut Staring knutst@gmail.com wrote:

Sorry, I misread your question a bit. In your case, you can only pass width and height if you wish to work with stored charts, like this:
http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u/data?width=300&height=400


Farai Mutero

On Wed, Jul 24, 2013 at 8:35 PM, Knut Staring knutst@gmail.com wrote:

Hi Farai,

If you look in the second table on this page, you will see that there is a dynamic parameter called ou:

http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, Jul 24, 2013 at 8:07 PM, Farai Mutero fmutero@gmail.com wrote:

Thanks Jan for the feedback. Noted.

The following querystring parameters "tableLayout=true&columns=dx;ou&rows=pe" found in the Web API documentation just provided what I was looking for :

api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu**&tableLayout=true&columns=dx;ou&rows=pe**

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

One more question : If I setup a chart using the Data Visualizer and I have saved it as “favourite”, how do I call that chart favourite from my html report passing a dynamic org unit parameter to it?

Regards

Farai

On Wed, Jul 24, 2013 at 7:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.


Farai Mutero

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Does it have to be a parameter? If I understand you correctly, you can get your stored charts by passing the chart uid as part of the url: http://apps.dhis2.org/dev/api/charts/UlfTKWZWV4u/data

image

image

···

On Wed, Jul 24, 2013 at 9:11 PM, Farai Mutero fmutero@gmail.com wrote:

So that means I can’t pass dynamic uid parameters then? Such a facility would have greatly assisted me to quickly create my html report leveraging off the charts already created and saved as favourites in the Data Visualizer. I would only need to dynamically pass the uid to it and get the relevant result. Now looks like I will have to reconstruct the charts from scratch?

On Wed, Jul 24, 2013 at 8:42 PM, Knut Staring knutst@gmail.com wrote:

Sorry, I misread your question a bit. In your case, you can only pass width and height if you wish to work with stored charts, like this:
http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u/data?width=300&height=400


Farai Mutero

On Wed, Jul 24, 2013 at 8:35 PM, Knut Staring knutst@gmail.com wrote:

Hi Farai,

If you look in the second table on this page, you will see that there is a dynamic parameter called ou:

http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, Jul 24, 2013 at 8:07 PM, Farai Mutero fmutero@gmail.com wrote:

Thanks Jan for the feedback. Noted.

The following querystring parameters "tableLayout=true&columns=dx;ou&rows=pe" found in the Web API documentation just provided what I was looking for :

api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu**&tableLayout=true&columns=dx;ou&rows=pe**

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

One more question : If I setup a chart using the Data Visualizer and I have saved it as “favourite”, how do I call that chart favourite from my html report passing a dynamic org unit parameter to it?

Regards

Farai

On Wed, Jul 24, 2013 at 7:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.


Farai Mutero

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

I think what Farai would like is to use the favorite as a template of how the chart should look, but then be able to get the same chart with different orgunits and for different periods. This would vastly improve the usability, especially in the case of reports - it’s hopeless to have to define a favorite for each of the possible combinations.

image

image

···

On Wed, Jul 24, 2013 at 10:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Does it have to be a parameter? If I understand you correctly, you can get your stored charts by passing the chart uid as part of the url: http://apps.dhis2.org/dev/api/charts/UlfTKWZWV4u/data


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, Jul 24, 2013 at 9:11 PM, Farai Mutero fmutero@gmail.com wrote:

So that means I can’t pass dynamic uid parameters then? Such a facility would have greatly assisted me to quickly create my html report leveraging off the charts already created and saved as favourites in the Data Visualizer. I would only need to dynamically pass the uid to it and get the relevant result. Now looks like I will have to reconstruct the charts from scratch?

On Wed, Jul 24, 2013 at 8:42 PM, Knut Staring knutst@gmail.com wrote:

Sorry, I misread your question a bit. In your case, you can only pass width and height if you wish to work with stored charts, like this:
http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u/data?width=300&height=400


Farai Mutero

On Wed, Jul 24, 2013 at 8:35 PM, Knut Staring knutst@gmail.com wrote:

Hi Farai,

If you look in the second table on this page, you will see that there is a dynamic parameter called ou:

http://apps.dhis2.org/demo/api/charts/UlfTKWZWV4u


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, Jul 24, 2013 at 8:07 PM, Farai Mutero fmutero@gmail.com wrote:

Thanks Jan for the feedback. Noted.

The following querystring parameters "tableLayout=true&columns=dx;ou&rows=pe" found in the Web API documentation just provided what I was looking for :

api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu**&tableLayout=true&columns=dx;ou&rows=pe**

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

One more question : If I setup a chart using the Data Visualizer and I have saved it as “favourite”, how do I call that chart favourite from my html report passing a dynamic org unit parameter to it?

Regards

Farai

On Wed, Jul 24, 2013 at 7:38 PM, Jan Henrik Øverland janhenrik.overland@gmail.com wrote:

Hi Farai, such layout is produced by the pivot tables client, so you cannot get it directly from the server.


Farai Mutero

On Wed, Jul 24, 2013 at 6:44 PM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m using the Web API to design an html report displaying pivot tables. How do I adjust my url call so that the pivot table rendered can display in the same way it was designed.

Using the DHIS2 demo for example, if I use the url http://apps.dhis2.org/demo/api/analytics.html?dimension=dx:Jtf34kNZhzP;cYeuwXTCPkU;fbfJHSPpUQD;hfdmMSPBgLG&dimension=ou:USER_ORGUNIT_CHILDREN&dimension=pe:THIS_YEAR I get this view :

Yet I would like the Pivot Table to have a layout like this :

Regards

Farai Mutero


Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Farai, the following parameters are supported for the chart resource:

ou=

pe=

date=

Need to include this in the docs.

Lars

That’s great - I thought they were not supported for the stored charts, because I tried a bit and did not see any difference. Could you provide an example URL for the demo?

···

On Thu, Jul 25, 2013 at 6:19 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Farai, the following parameters are supported for the chart resource:

ou=

pe=

date=

Need to include this in the docs.

Lars


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Hi Lars

Does the ou parameter for the chart resource accept multiple ou_ids or a parent ou ids? The charts I’m seeking to create will in most cases display multiple facilities in a single chart.

Is there a work around at the moment that I can use to create a template chart and then pass dynamic parameters to it to generate multiple charts for many facilities?

Your assistance would be greatly appreciated as I’m pretty much stuck at the moment.

Regards

Farai

···

On Thu, Jul 25, 2013 at 7:02 PM, Knut Staring knutst@gmail.com wrote:

That’s great - I thought they were not supported for the stored charts, because I tried a bit and did not see any difference. Could you provide an example URL for the demo?


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Farai Mutero

On Thu, Jul 25, 2013 at 6:19 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Farai, the following parameters are supported for the chart resource:

ou=

pe=

date=

Need to include this in the docs.

Lars


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org