【发布时间】:2016-11-25 06:53:12
【问题描述】:
我需要选择除我悬停的数据集以外的所有内容,到目前为止,我已经拥有它,所以没有选择 this,但现在我需要选择它,所以 this 并且没有选择具有公共数据集的所有内容
.on("mouseover", function(d) {
console.log(d);
var circleUnderMouse = this;
d3.selectAll(".dot").filter(function(d,i) {
return (this !== circleUnderMouse);
})
})
【问题讨论】:
-
你可以使用 :not 选择器 d3.select("svg").selectAll("*:not(.dot)");将 svg 替换为 ur rtto 元素
标签: javascript select d3.js mouseover selectall