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

[Bar Chart] Set max width of a bar #1032

Closed
wisyr opened this issue Jan 24, 2021 · 2 comments
Closed

[Bar Chart] Set max width of a bar #1032

wisyr opened this issue Jan 24, 2021 · 2 comments

Comments

@wisyr
Copy link

wisyr commented Jan 24, 2021

tl;dr - Is there a way to set a max width of a bar in charts but still keep it dynamic?

The issue is related with bar width. If there's enough of data, a single bar looks just okey.
image

But if there's no enough data, the bars are getting too wide.
image

Is there a way to somehow set a max width of a single bar? But still keep it dynamic so it is responsive when chart is resizing.

Playground: https://codesandbox.io/s/holy-pine-i5sp2?file=/Example.tsx

Thank you for such an outstanding library!

@wisyr wisyr changed the title Set max width of a bar [Bar Chart] Set max width of a bar Jan 24, 2021
@williaster
Copy link
Collaborator

Hey @wisyr thanks for checking out visx! We recently enabled discussions on this repo to help with usage questions versus actual issues with visx.

I'm going to go ahead and move your question over there because I think it's more about usage, but feel free to re-open this if you think it's an issue with visx!

@joefreeman
Copy link

#1035

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

No branches or pull requests

3 participants