You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have a grid of three in a row and i'm struggling to make them actually responsive. instead, they're stuck in their fixed svg viewbox and get cut off, or get stuck in their aspect ratio. the closest i've gotten is making the grid container have a fixed height, set aspect-square, then set a high enough maximum size so that there's enough padding on top.
chrome_iFdfHwU4pC.mp4
removing the fixed parent container height then:
setting w-full aspect-auto min-h-30 results in a chart with 0 height
setting w-full min-h-30, so defaulting to aspect-video results in whatever this is:
chrome_9BYLiyqIwX.mp4
setting the minimum height doesn't actually do much either. min-h-30 is functionally the same as min-h-3 somehow. its only until i set min-h-36 it overflows out the side.
i realize this is just a skill issue in how svg viewboxes and recharts work, but nothing about this is responsive at all. i've looked through a bunch of the hacks provided in recharts/recharts#172 to no avail. what's the solution here?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
using the radial chart - stacked example, it's constrained to a square container: https://v0.dev/chat/D3w3SS1Usyu?b=b_1UyZynWT5HP
i have a grid of three in a row and i'm struggling to make them actually responsive. instead, they're stuck in their fixed svg viewbox and get cut off, or get stuck in their aspect ratio. the closest i've gotten is making the grid container have a fixed height, set aspect-square, then set a high enough maximum size so that there's enough padding on top.
chrome_iFdfHwU4pC.mp4
removing the fixed parent container height then:
setting
w-full aspect-auto min-h-30
results in a chart with 0 heightsetting
w-full min-h-30
, so defaulting toaspect-video
results in whatever this is:chrome_9BYLiyqIwX.mp4
setting the minimum height doesn't actually do much either.
min-h-30
is functionally the same asmin-h-3
somehow. its only until i setmin-h-36
it overflows out the side.i realize this is just a skill issue in how svg viewboxes and recharts work, but nothing about this is responsive at all. i've looked through a bunch of the hacks provided in recharts/recharts#172 to no avail. what's the solution here?
Beta Was this translation helpful? Give feedback.
All reactions