Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

adding an info div to network visualization

View index.html
1 2 3 4
<div id="main" role="main">
<div id="vis"></div>
<div id="info"></div>
</div>
View index.html
1 2 3
node.on("mouseover", showDetails)
.on("mouseout", hideDetails)
.on("click", showInfo)
View index.html
1 2 3 4 5 6 7 8 9
showInfo = (d,i) ->
infoDiv = d3.select("#info")
content = "<ul>"
content += "<li>Name: #{d.name}</li>"
content += "<li>Artist: #{d.artist}</li>"
content += "<li>Playcount: #{d.playcount}</li>"
content += "</ul>"
 
infoDiv.html(content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.