Last active
August 29, 2015 14:06
-
-
Save lewisacidic/69bece200038e67d42bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<meta charset="utf-8"> | |
<script src="http://www.d3plus.org/js/d3.js"></script> | |
<script src="http://www.d3plus.org/js/d3plus.js"></script> | |
<style> | |
a#google { | |
background-color: #cc0000; | |
color: white; | |
display: block; | |
font-size: 24px; | |
margin: 50px; | |
padding: 10px; | |
text-align: center; | |
text-decoration: none; | |
} | |
</style> | |
<div id="viz"></div> | |
<script> | |
var sample_data = [ | |
{"value": 100, "name": "alpha"}, | |
{"value": 70, "name": "beta"}, | |
{"value": 40, "name": "gamma"}, | |
{"value": 15, "name": "delta"}, | |
{"value": 5, "name": "epsilon"}, | |
{"value": 1, "name": "zeta"} | |
] | |
var htmlButton = "<a id='google' href='http://www.google.com' target='_blank'>Click here to go to Google</a>" | |
var visualization = d3plus.viz() | |
.container("#viz") | |
.data(sample_data) | |
.id("name") | |
.size("value") | |
.tooltip({"html": htmlButton}) | |
.type("network") | |
.draw() | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment