Chrome中的D3拓扑渲染问题

时间:2014-09-15 14:10:49

标签: google-chrome d3.js

下面的地图显示了美国某个州的城镇边界。在FF和Safari中,城镇边界正确渲染,但在谷歌浏览器中,许多边界弧都连接到错误的节点。我的代码遵循优秀的教程here。我的代码部分呈现内部边界是罪魁祸首,我尝试对拓扑功能进行排序,但它没有任何效果。这是片段:

    svg.append("path")
    .datum(topojson.mesh(maine, maine.objects.subunits, function(a, b) { return a !== b }))
    .attr("d", path)
    .attr("class", "subunit-boundary interior");

该网站的完整示例为here

boundary topology error

1 个答案:

答案 0 :(得分:5)

我认为您的问题归因于此Chrome错误:

<强> Issue 364866: SVG stroke-dasharray applies dashes across disconnected (M) path segments.

尝试从您的CSS中删除stroke-dasharray设置。希望你能没有虚线的边界生活。

相关问题