支持鼠标悬停,鼠标移出,点击r3d4?

时间:2013-04-15 09:51:45

标签: d3.js raphael

我正在使用d3和raphael来支持较低版本的Internet Explorer。我几乎完成了它,但我需要在我的ui上有鼠标事件,但正如我正在使用

var d3_raphael = d3.raphael(paper);

它不支持任何事件。我尝试了一切,因为我天真......我的代码是

var node = chart.selectAll("g.node")
    .data(bubble.nodes(stuff).filter(function(d) { 
            return !d.children; 
        }))
    .enter().append("circle")
            .attr("class", "node")
    .attr("cx",function(d) { return d.x; })
    .attr("cy",function(d) { return d.y; })
    .attr("r", function(d) { return d.r; })
    .attr("fill", function(d) {return fill(d.packageName); })
            .on("mouseover",function(){alert('heeloo');})

1 个答案:

答案 0 :(得分:0)

设置fill属性后,您有一个分号;。删除它必须解决您的问题。

相关问题