-
vizulyJune 21, 2016 at 1:19 pm #6227
Hi John,
No problem.
In your halo_test.js file one of the first blocks of code you see is this:
viz.data(data) .width(800).height(600) .haloKey(function (d) { return d.CMTE_ID; }) .nodeKey(function (d) { return d.CAND_ID; }) .nodeGroupKey(function (d) { return d.PTY; }) .value(function (d) { return Number(d.TRANSACTION_AMT); }) .on("update", onUpdate) .on("nodeover",node_onMouseOver) .on("nodeout",onMouseOut) .on("arcover",arc_onMouseOver) .on("arcout",onMouseOut) .on("linkout",onMouseOut);
Just add this to the end
.on("nodeclick",function (d,i) { // Get the url you want to open - perhaps from the data element you populate it with? var myUrl = d.myCustomURL OR var myUrl = "http://someotherurl.com"; window.open(myUrl); })
Now the halo in the test file will be able to respond to that click event.
– Tom
You must be logged in to reply to this topic.
© 2024 — vizuly.io