gpt4 book ai didi

javascript - 在 HighCharts 中使用填充图案而不是颜色

转载 作者:数据小太阳 更新时间:2023-10-29 04:37:08 24 4
gpt4 key购买 nike

我一直在寻找在网络应用程序中生成图表的各种方法,并找到了 HighCharts特别有用。该应用程序需要满足色盲的需求,因此我正在考虑使用图案而不是填充颜色 - 如所述in this question .

像这样的东西需要在 <defs> 中SVG 部分:

<pattern id="triangles"  width="10" height="10" patternUnits="userSpaceOnUse">
<polygon points="5,0 10,10 0,10"/>
</pattern>
<pattern id="diagonal-hatch" patternUnits="userSpaceOnUse" width="4" height="4">
<path d="M-1,1 l2,-2 M0,4 l4,-4 M3,5 l2,-2"/>
</pattern>
<pattern id="cross-hatch" patternUnits="userSpaceOnUse" x="0" y="0" width="6" height="6">
<g style="fill:none; stroke:#22fa23; stroke-width:1">
<path d="M0,0 l10,10"/>
<path d="M10,0 l-10,10"/>
</g>
</pattern>

然后代替 fill="#0d233a"我有 fill="url(#triangles)"

还有其他人用 HighCharts 做过吗?有没有可能让 HighCharts 做到这一点而不用把它砍成碎片?

最佳答案

似乎有一个pattern fill plugin .

关于javascript - 在 HighCharts 中使用填充图案而不是颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17448962/

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