Async JSONstat (template)

<!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="";

    function main(){
      ds=this.Dataset(0);

      //Pyramid
      visual({
        lang: "en",
        type: "pyram",

        title: "Pyramid Template",
        footer: "Source...",

        time: "2015",
        by: [ "0-44", "45-64", "64-100" ],
        data: [
          {
            label: "Male",
            val: [ 35, 10, 5 ]
          },
          {
            label: "Female",
            val: [ 25, 15, 10 ]
          }
        ]
      });
    }

    JSONstat(url, main);
    </script>
  </body>
</html>