C3.js How To Get A Onclick Event For Datagroups
I have been using c3.js and cant figure out how to get a JavaScript event for onClick of the Data group labels which is displayed in X Axis. Basically i need event to which I can
Solution 1:
There is no method, as of yet, in c3js for adding onClick events on ticks.
But you can directly use d3:
d3.selectAll('.tick')
.on('click', function(value,index){
alert('You clicked a tick.');
});
This will add an event that will fire when you click a tick.
jsfiddle sample : http://jsfiddle.net/Lc3447Lb/1/
Post a Comment for "C3.js How To Get A Onclick Event For Datagroups"