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

[ResponsiveLine] Typescript error "orient does not exist" #1771

Open
Paul6552 opened this issue Sep 9, 2021 · 3 comments
Open

[ResponsiveLine] Typescript error "orient does not exist" #1771

Paul6552 opened this issue Sep 9, 2021 · 3 comments
Labels
bug 📈 line @nivo/line package website

Comments

@Paul6552
Copy link

Paul6552 commented Sep 9, 2021

Describe/explain the bug
Typescript is complaining that the property "orient" does not exist on axisBottom or axisLeft.

To Reproduce
Go to Nivo Webpage Line

Take the generated code and paste it into your development area. (e.g. Intellij)

Expected behavior
"No typescript error"

Screenshots
Bildschirmfoto vom 2021-09-09 09-29-15

context
"@nivo/line": "^0.73.0",
"@nivo/core": "^0.73.0",
Browser: Firefox latest or Chrome latest

@Paul6552 Paul6552 changed the title Typescript error "orient does not exist" [ResponsiveLine] Typescript error "orient does not exist" Sep 9, 2021
@plouc plouc added the 📈 line @nivo/line package label Sep 16, 2021
@DoneDeal0
Copy link

@Paul6552 , @plouc I sent a pr to fix this issue: #1797

@NathaEEUD
Copy link

Hi there! I was looking at the same TypeScript error and I guess that the orient property is redundant with the global property itself, for example, if we have axisBottom that infers that the orientation is the bottom axis and so on with the other properties. So, in my opinion, the orient property should be removed from the examples.

@plouc
Copy link
Owner

plouc commented Oct 11, 2021

@NathaEEUD, you're right, it shouldn't be exposed, and if we were to support overriding it, we would have to create different types for horizontal & vertical axes anyway, for example orient='left' would not make sense for an horizontal axis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 📈 line @nivo/line package website
Projects
None yet
Development

No branches or pull requests

5 participants