问题
I'm trying to disable the tooltip for the line
serie of my chart and leave the one of the bar
serie. I can't really see how I can do it.
The problem I have with both series' tooltips enabled is that I cannot see the tooltip of the bar
serie because it's always selecting the one from the line
which is closer. Maybe it's possible to trigger the tooltip if the mouse is closer to the point? at the moment it's triggering it at around 10-20px away from the point.
回答1:
This should do it:
var chart = nv.models.linePlusBarChart()
.margin({top: 30, right: 60, bottom: 50, left: 70})
...
;
chart.lines.interactive(false) // add this line
来源:https://stackoverflow.com/questions/23754188/nvd3-js-how-to-disable-tooltips-for-one-serie-only