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

ResponsiveCalendar height issue #2511

Closed
lukecharle opened this issue Feb 6, 2024 · 2 comments
Closed

ResponsiveCalendar height issue #2511

lukecharle opened this issue Feb 6, 2024 · 2 comments

Comments

@lukecharle
Copy link

lukecharle commented Feb 6, 2024

Describe/explain the bug
I've added a ResponsiveCalendar component to my Shopify embedded app, I'm having an issue where the <rect> its creating inside the SVG is setting a height bigger than it requires

Expected behavior
I expect the container to only use the space needed to fit the table/legends in.

Screenshots
Screenshot 2024-02-06 at 21 33 14

Desktop (please complete the following information):

  • OS: mac OS 14.1.2 (23B92)
  • Browser Firefox 122.0
@plouc
Copy link
Owner

plouc commented Feb 24, 2024

@lukecharle, the SVG get its height from its parent's height, this is the intended behavior.
nivo doesn't pre-compute some kind of ratio for the chart to then try to find the best fit in the available space, it simply uses the space available.
Although you can establish a ratio in CSS via aspect-ratio, should work with width: 100% (if I understood your expectations correctly).

@plouc
Copy link
Owner

plouc commented Mar 7, 2024

Closing this issue as this is the intended behavior, please feel free to comment if you think of another approach for this issue.

@plouc plouc closed this as completed Mar 7, 2024
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

2 participants