I need your help.
I am trying to embed DHIS charts and tables in a website. I tried both the embed snippet available in visualizer as well as that in Web API doc - 1.40.1 Embedding pivot tables with the Pivot Table plug-in.
I am developing on localhost. First off, the CDN URLs (shown below) provided in both snippets does not resolve.
<script src="https://dhis2-cdn.org/v227/plugin/jquery-2.2.4.min.js"></script> <script src="https://dhis2-cdn.org/v227/plugin/reporttable.js"></script>
I later found the reporttable.js file inside dhis file hierarchy itself. For JQuery, I used the public JQuery url. See below.
<script src="//[code.jquery.com/jquery-2.2.4.min.js](http://code.jquery.com/jquery-2.2.4.min.js)"> </script> <script src="https://play.dhis2.org/2.31.1/dhis-web-pivot/reporttable.js"></script>
However, when I run the code snippet (provided in developer doc) expecting it to load a table, I get an exception on the console like so:
Failed to load https://play.dhis2.org/demo/api/29/me.json: Response for preflight is invalid (redirect)
Can someone please give ideas/solution on getting the me.json file to load and display the chart from where I am?