【问题标题】:SVG path isn't displayed in Internet ExplorerInternet Explorer 中不显示 SVG 路径
【发布时间】:2015-10-28 07:15:38
【问题描述】:

我正在使用 FusionChartXT,我的折线图在 IE 中不显示 div 线。

现在我查看了 svg 代码 这是 internet-explorer 中一个 divline 的代码:

<path xmlns="http://www.w3.org/2000/svg" style="fill: none; stroke: #bbbbbb; stroke-opacity: 0.7;" fill="none" stroke="#bbbbbb" stroke-dasharray="-6" stroke-opacity="0.7" stroke-width="1" d="M 32 438.5 L 438 438.5" shape-rendering="crispEdges" />

这是 Chrome 中的代码,其中显示了该行:

<path d="M33,167.5L438,167.5" stroke="#bbbbbb" stroke-opacity="0.7" stroke-width="1" stroke-dasharray="-6" fill="none" shape-rendering="crispEdges" style="stroke: rgb(187, 187, 187); stroke-opacity: 0.7; fill: none; shape-rendering: crispEdges;"></path>

所以因为我不太擅长 svg 图形,所以我不明白为什么它在 IE 中不起作用。

更新
IE 中有一个错误会导致带有标记的路径无法正确呈现。但我真的不知道我的代码中是否有标记。

【问题讨论】:

    标签: html google-chrome internet-explorer svg


    【解决方案1】:

    根据SVG specstroke-dasharray 的负值被视为错误。在这种情况下,IE 似乎比其他可能更容错的浏览器更接近规范。尝试更正您的路径以包含 stroke-dasharray 的正确值(即正值)。

    【讨论】:

    • 嗯,它现在显示一行,但我不知道我必须在哪里更改 FusionChart 代码中的任何内容
    • 如果您在代码方面需要帮助,我们至少需要查看导致问题的相关部分。
    • 查看chart attributes 文档中的Divisional Lines & Grids 部分。有一些属性,如divLineDasheddivLineDashLendivLineDashGap,从它们的名称来看,可能会影响stroke-dasharray
    • 如果我将“divLineIsDashed”设置为 1,它就可以工作。但我不想有虚线。
    猜你喜欢
    • 2013-03-13
    • 2015-01-10
    • 2015-05-10
    • 2015-02-03
    • 2011-08-31
    • 1970-01-01
    • 2019-09-19
    • 2014-03-21
    • 2021-05-26
    相关资源
    最近更新 更多