gpt4 book ai didi

google-chrome - Chrome 中的 D3 拓扑渲染问题

转载 作者:行者123 更新时间:2023-12-04 19:05:33 32 4
gpt4 key购买 nike

下面的 map 显示了美国一个州的城镇边界。在 FF 和 Safari 中,城镇边界呈现正确,但在 Google Chrome 中,许多边界弧连接到错误的节点。我的代码遵循优秀教程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

最佳答案

我相信您的问题是由于这个 Chrome 错误造成的:

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

尝试删除 stroke-dasharray从你的 css 设置。希望您可以生活在没有虚线边界的情况下。

关于google-chrome - Chrome 中的 D3 拓扑渲染问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25850055/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com