Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

d3 click event handle(object)

I need click event handle in D3.js i.e the event object on click. My code

 node.enter().append("svg:circle")
      .on('click', function(data,index){

       });

But I want event object like this in jquery

$('element').on('click',function(event){
    //Like the 'event' object here
});
like image 534
Rajagopal Avatar asked Jul 25 '13 12:07

Rajagopal


1 Answers

node.enter().append("svg:circle")
    .on('click', function(data,index){
         d3.event; // => Original DOM Event
     });

» More info about d3.event.

like image 110
James Avatar answered Oct 12 '22 23:10

James