标签: javascript d3.js
Helllo。如果我将here等提示与悬停结合起来怎么办: .on("mouseover", tip.show) .on('mouseout', tip.hide)和.on("mouseover", function(d){ ... }) .on('mouseout', function(d){ ... })如何同时使用它们?
.on("mouseover", tip.show) .on('mouseout', tip.hide)
.on("mouseover", function(d){ ... }) .on('mouseout', function(d){ ... })
答案 0 :(得分:1)
你只需要在现有的回调中调用函数
.on("mouseover", function(d){ tip.show(d);