显示多行时,React Native Svg Charts剪切路径行不起作用

我正在使用this包创建剪切的图表路径。 当我显示单行但显示多行时,它正在工作,但显示的是直线,但问题是虚线未显示。

这是我的代码

const DashedLine = ({ line }) => (
<Path
key={"line-1"}
d={line}
stroke={"rgb(134,65,244)"}
strokeWidth={2}
fill={"none"}
strokeDasharray={[4,4]}
clipPath={"url(#clip-path-2)"}
/>
);

const Clips = ({ x,width,xValue }) => (
<Defs key={"clips"}>
<ClipPath id="clip-path-1">
  <Rect x={"0"} y={"0"} width={x(xValue)} height={"100%"} />
</ClipPath>
<ClipPath id={"clip-path-2"}>
  <Rect
    x={x(xValue)}
    y={"0"}
    width={width - x(xValue)}
    height={"100%"}
  />
</ClipPath>
</Defs>
);

显示多行时,React Native Svg Charts剪切路径行不起作用

能帮我找出问题所在吗?

jun576 回答:显示多行时,React Native Svg Charts剪切路径行不起作用

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2356099.html

大家都在问