Reputation: 35
I'm working with a DC.js lineChart, I added a tooltip with d3-tip, but when I activate it, the points in the lineChart do not disappear, as in the image.
What can I be doing wrong with the d3-tip?
Upvotes: 0
Views: 159
Reputation: 20150
It's easier for folks to answer your question if you include a reproducible example and the relevant code in your question.
Did you namespace your events? You probably want mouseover
and mouseout
to be handled by both the line chart and d3.tip.
So using the quick usage d3.tip code,
.on('mouseover', tip.show)
.on('mouseout', tip.hide)
should probably be
.on('mouseover.tip', tip.show)
.on('mouseout.tip', tip.hide)
This way dc.lineChart
will not lose its own mouseout events.
Example fiddle: http://jsfiddle.net/gordonwoodhull/8z15xboq/6/
Upvotes: 1