Search code examples
d3.jstooltipnvd3.js

Not able to disable tooltip nvD3.js


I am trying to disable tooltip from the discrete bar chart which is the most easiest thing to do. But still its not working. I tried chart.tooltip(false), but it gives chart.tooltip function not defined console error. And because i am using plain nvD3 and not angular-nvD3 directives, if I use interactive(false), it gets ignored.

I did installed nvD3 using bower, is that the reason for it acting that way. am i missing any of the library required for the tooltip? please help.

link(rel="stylesheet", href="_assets/bower/nvd3/build/nv.d3.css")
script(src="_assets/bower/d3/d3.js")
script(src="_assets/bower/nvd3/build/nv.d3.js")

Solution

  • Instead of

    chart.tooltip(false)

    do

    chart.tooltips(false) //this is deprecated

    chart.tooltip.enabled(false)//this is latest

    example here

    doc refer