Skip to content Skip to sidebar Skip to footer

Dc Linechart Pop Up Datapoint Info On Click

I am attempting to detect click on line chart datapoints. Per this answer ( dc scatter plot binding onClick event ) I am attempting to use the pretransition event as described, but

Solution 1:

Each chart uses different elements and classes for its diagrams. This is currently not documented, so the best bet is to go to the source.

In this case, here's the line:

var dots = g.selectAll('circle.' + DOT_CIRCLE_CLASS)

https://github.com/dc-js/dc.js/blob/f7e0a47d1246b95acbc279f14243524a0769fb84/src/line-chart.js#L279

After looking up the constant, the selector you're looking for should be circle.dot

I've added an issue to document these.

https://github.com/dc-js/dc.js/issues/1278

Post a Comment for "Dc Linechart Pop Up Datapoint Info On Click"