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
Better symlog scale ticks #2245
Conversation
🦋 Changeset detectedLatest commit: 2720d9b The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Anyways, if it ever goes back: ```typescript // Explicitly fixing rounding errors on zero, if exists if (tLower < 0 && tUpper > 0) ticks[-Math.ceil(tLower / expStep)] = 0; ```
Like 0.1234111-0.1234223
OEIS stuff is weird, but I can't find cases to trigger it because of linear scale fallback, so it doesn't seem important. Thanks for the fixes! |
It just a way of indexing in 1/2/5/10 with support for rounding function and without any conditionals. Basically, it maps number to index in that OEIS sequence, rounds, and gets back |
Yeah, I understood that part, but it wasn't clear to me if there's a combination of parameters where it returns any weird values beyond 10. I see now that it won't, since sqrt(9) = 3. |
After asking around, removed boundary values, and now rounding to a single significant digit
Always tries to display zero if in range
Switches to linear scale if log size of area is smaller than threshold (I think that's something that autoscale should do, but hell why not)
Fixes #2036