Iceland Line (example)

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <script src="http://json-stat.org/lib/json-stat.js"></script>
    <link rel="stylesheet" href="http://idescat.github.io/visual/visual.css" />
    <script src="http://idescat.github.io/visual/lazyvisualsetup.js"></script>
  </head>

  <body>
    <div id="visual" class="visual"></div>

    <script>
    url="http://px.hagstofa.is/pxen/api/v1/en/Efnahagur/visitolur/1_visitalaneysluverds/1_neysluverd/VIS01000.px";
    query={
  "query": [
    {
      "code": "Month",
      "selection": {
        "filter": "item",
        "values": [
          "0",
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11"
        ]
      }
    },
    {
      "code": "Index",
      "selection": {
        "filter": "item",
        "values": [
          "0"
        ]
      }
    },
    {
      "code": "Annualized rates",
      "selection": {
        "filter": "item",
        "values": [
          "5"
        ]
      }
    }
  ],
  "response": {
    "format": "json-stat"
  }
};

    function getvalue(e){
      return e.value;
    }
    function gettime(e){
      return e.Month+" "+e.Year;
    }

    function main(obj){
      ds=JSONstat(obj).Dataset(0);

      //Line Chart
      visual({
        lang: "en",
        type: "tsline",

        title: ds.label,
        footer: ds.source,

        time: ds.toTable({type: "arrobj"}, gettime),
        data: [
          {
            label: "CPI",
            val: ds.toTable({type: "arrobj"}, getvalue)
          }
        ],
        axis: {x: false},
        dec: 1
      });
    }

    POST(url, query, main);

    function POST(url, query, main){
      fetch( url, { method: "post", body: JSON.stringify(query) } )
        .then(function(resp) {
          resp.json().then(main);
        })
      ;
    }
    </script>
  </body>
</html>