Skip to content

Instantly share code, notes, and snippets.

@skoslitz
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skoslitz/34aeeee77ee17c2c3bda to your computer and use it in GitHub Desktop.
Save skoslitz/34aeeee77ee17c2c3bda to your computer and use it in GitHub Desktop.
load json with D3
<script type="text/javascript">
var visData; // a global
var apiUrl = "http://localhost/yiiRest/basic/web/index.php/event/temporal"
d3.json(apiUrl)
.header("Content-Type", "application/json")
.get(function(error, jsonData) {
visData = jsonData;
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment