Skip to content

Instantly share code, notes, and snippets.

@sweemeng
Created May 11, 2016 07:22
Show Gist options
  • Save sweemeng/2afc72813efac3c177a9150be2aed354 to your computer and use it in GitHub Desktop.
Save sweemeng/2afc72813efac3c177a9150be2aed354 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<script>
var data = {
"nodes":[],
"links":[]
};
var instance;
var api_endpoint = "http://api.popit.sinarproject.org/en";
function pushNode(error, resp){
if (error) throw error;
instance = resp;
}
// generate initial data
d3.json("http://api.popit.sinarproject.org/en/persons/55b4c72c98f2c81a501e11f4", pushNode);
console.log(instance);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment