I am currently working on a graph application using d3.js. Following is the link to the d3-forced directed graph: https://bl.ocks.org/mbostock/4062045 If i create an on-click event for a node like:
node.on("click", function(d){
console.log(d.id);
});
This even will print the names of nodes in the console of the developers tools of the browser. However I need to create a window in the html page(a widget) which will take this value and print it on clicking the node.
Is there any way to print the console output on html window widget(just another div)?
P.S. there is a similar question asked: how to make a output console using TextArea? But the answer is for determining the thresholding and not how to create it.
Help appreciated.
$('#somediv').append('<p>' + d.id + '</p>');instead of console.log(), basically.