我有一张地图,当悬停在地图上黄线和圆圈下方的区域上时,最后一个消失。我怎么解决这个问题?

http://jsfiddle.net/ot21n9qx/

       var arc = g.append("path")
        .style("fill", "none")
        .style("stroke", "yellow")
        .style("stroke-width", 2)
        .attr("d", "M" + pathOrigin[0] + "," + pathOrigin[1] + " Q" + svgPoint[0] + "," + pathOrigin[1] + " " + svgPoint[0] + "," + svgPoint[1]);

      var circleSize = d3.scale.linear()
        .domain([0, 0.5, 1])
        .range([4, 10, 4]);

最佳答案

SVG没有Z顺序,但是按照对象创建的顺序绘制它们。创建突出显示区域后,只需创建pathcircle

这是分叉的小提琴:
http://jsfiddle.net/o00fzgaf/1/

09-20 10:51