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

Making your own scale to fit to width, for instance #5

Open
NickCarducci opened this issue Oct 16, 2021 · 0 comments
Open

Making your own scale to fit to width, for instance #5

NickCarducci opened this issue Oct 16, 2021 · 0 comments

Comments

@NickCarducci
Copy link

NickCarducci commented Oct 16, 2021

tl;dr, This issue is solved by typechecking data outside of the pointElement mapping for Paths (lines, curves), but is confusing to diagnose since it doesn't warn in codesandbox, only warns in chrome>inspect, and crashes in Safari, probably others.
I believe you can check type of x for path, I was thrown for a couple days the red herring of a fine run by Chrome with warning but crashing with Safari, which for a few weeks I did not test and didn't notice. So, if you're developing in Chrome, in a codesandbox IDE, for instance, the issue is the svg call that fails on an updated variable in your scaling function (normally to width of window) seems to keep running & trying again if you start with undefined. This makes the webapp slow & only fails on Safari. It might fail on others but only warns on Chrome. The warning <path d= NaN />is correct, and the <svg/> outside the react-svg-curve's exported curves inside should return when types are checked, including your variables in scale.

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

1 participant