Hi everyone,
I wanted to add checkbox and tried this code:
svg.selectAll("foreignObject").data(nodes).enter().append("foreignObject").attr('x', o.x).attr('y', o.y).attr('width',50).attr('height',20).append("xhtml:body").html("<form><input type=checkbox id=check></input></form>").on("click",function(d, i){ console.log(svg.select("#check").node().checked)});
How it can be added using "input"?