0

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.

enter image description here

What can I be doing wrong with the d3-tip?

ragde
  • 35
  • 3

1 Answers1

1

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/

Gordon
  • 19,811
  • 4
  • 36
  • 74