0

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

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');})
4

1 回答 1

0

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

于 2013-04-15T17:55:39.870 回答