Visx: SpliLinePath: The segments are not split correctly

Created on 6 Nov 2020  路  4Comments  路  Source: airbnb/visx

I am using SplitLinePath for a chart and when I am giving the segments array, the generated SVG points are not correct, meaning that they are not split correctly and the first segment has points from the second segment and so on, so the segments are shifted a little bit. Did someone else had this issue or can help me?

@visshape 馃悰bug

Most helpful comment

I've been using visx and have had a great experience so far, however I also have this problem. Here's another example (from my project) in case it helps with resolving the issue: codesandbox.

You can see that where the line splits does not match up with either the axis line or the circle that indicate where userValue lies on the chart. Thanks!

All 4 comments

Hey @roxanagirdu 馃憢 thanks for checking out visx. I've not experienced this issue before with SplitLinePath, but without a concrete example it's hard for us to debug further.

Can you link to a codesandbox or equivalent so we can 馃憖 ?

Please find bellow an example.
https://codesandbox.io/s/interesting-kepler-fpw96?file=/index.tsx

After the green line, it should start the second segment at index 240. But it does not do that.

I've been using visx and have had a great experience so far, however I also have this problem. Here's another example (from my project) in case it helps with resolving the issue: codesandbox.

You can see that where the line splits does not match up with either the axis line or the circle that indicate where userValue lies on the chart. Thanks!

Thanks for the sandboxes to reproduce! definitely seems like some type of bug. I'm not going to have the bandwidth to dig into this for a bit but would happily review a PR if anyone wants to 馃憖 馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

m0t0r picture m0t0r  路  3Comments

OKNoah picture OKNoah  路  5Comments

bernatfortet picture bernatfortet  路  4Comments

akhil9tiet picture akhil9tiet  路  3Comments

asteroidice picture asteroidice  路  3Comments