Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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")
like image 830
user2128 Avatar asked Apr 12 '16 21:04

user2128


1 Answers

Instead of

chart.tooltip(false)

do

chart.tooltips(false) //this is deprecated

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

example here

doc refer

like image 160
Cyril Cherian Avatar answered Nov 15 '22 11:11

Cyril Cherian