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

d3-scale out of sync with typings #855

Closed
billyjanitsch opened this issue Oct 7, 2020 · 3 comments · Fixed by #856
Closed

d3-scale out of sync with typings #855

billyjanitsch opened this issue Oct 7, 2020 · 3 comments · Fixed by #856

Comments

@billyjanitsch
Copy link

@visx/scale depends on d3-scale@^3.0.1 and @types/d3-scale@^2.1.1. This means that a v3 scale passed to @visx/axis won't type-check correctly even though the runtime version is v3. It should depend on @types/d3-scale@^3.0.0 instead.

"dependencies": {
"@types/d3-interpolate": "^1.3.1",
"@types/d3-scale": "^2.1.1",
"@types/d3-time": "^1.0.10",
"d3-interpolate": "^1.4.0",
"d3-scale": "^3.0.1",

@williaster
Copy link
Collaborator

thanks for the bug report @billyjanitsch 🙏 happy to review a PR if anyone wants to take this on. @kristw does this sound reasonable to you?

@williaster
Copy link
Collaborator

side q: are you thinking of using visx for mixcreant? I've done some tinkering / thinking about cocktail vis so am excited to see what that turns out to be 📈 🍹 👀

@kristw
Copy link
Collaborator

kristw commented Oct 7, 2020

Yes, this makes sense.
The library @types/d3-scale@3.x was just released 2 days ago.

There should not be breaking changes for the existing scales as d3-scale upgrade from 2 to 3 only drop support for older browser and IE. There are a few new features for color scales, which should not affect scales used with axis.

I have to verify a what else were changed in the type declaration v3 too as there were some mismatches between d3-scale@2 behaviors and the type declaration v2. Hopefully they got fixed in this new v3.

I am taking this one.

@kristw kristw self-assigned this Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants