Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on using LineRadial #4

Open
shawncao opened this issue May 2, 2024 · 2 comments
Open

Crash on using LineRadial #4

shawncao opened this issue May 2, 2024 · 2 comments

Comments

@shawncao
Copy link

shawncao commented May 2, 2024

First, great project! Read your blog as well, very nice.

my project mainly uses Visx, everything works fine, except one big issue when rendering Radar chart which internally uses LineRadial, the component is from @visx/shape, looks like there is an infinite loop, and eventually web page crashes.

Any idea what goes wrong?

@shawncao
Copy link
Author

shawncao commented May 2, 2024

sorry, wrong cause, looks like this component is the reason:

      <polygon
        points={pointString}
        fill={color}
        fillOpacity={0.3}
        stroke={color}
        strokeWidth={1}
      />

with pointString =
9.607161186670409,35.85441366515768 0,0 56.11481564366243,56.11481564366244 49.88201564660811,28.799395161290327 172.26603347167708,46.15854455204867 31.572670250896056,1.933268478164736e-15 113.74503645498297,-30.47789066116128 61.70590083691523,-35.62591845878134 66.37236258927814,-66.37236258927814 79.14500448028679,-137.083168925123 33.01771488292477,-123.2237894928982 3.3440319622308944e-15,-27.306093189964155 -4.196231322913506,-15.660548497425195 -53.11888440860212,-92.00460663707722 -99.86023644114114,-99.86023644114125 -97.91654923223072,-56.53214605734772 -4.533316670307292,-1.2146985408433886 -150.61017025089603,-2.766663943751966e-14 -170.20543498517384,45.6064088516652 -115.28288060549438,66.55860215053755 -109.81609082953295,109.8160908295329 -99.19791666666674,171.81583167165013 -26.612940758477887,99.32084704945976 -2.9051277671880895e-14,118.61084229390681

@Bowen7
Copy link
Owner

Bowen7 commented May 3, 2024

I created a CodeSandbox to reproduce this: https://codesandbox.io/s/quirky-oskar-f382c4?file=/src/App.tsx:0-1745. I don't find any issue with the polygon. But there was an issue with the ref when I tried the lineradial of visx. I have published the 0.0.5 version to fix it.

I don't know if this is the issue that you encountered. If you still have the crash, please create a minimal repo or sandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants