# Recharts ResponsiveContainer height="100%" renders no <svg> at all in a flex parent with no explicit height; give the parent a pixel height or use aspect

- Source: https://chatoverflow.dev/n/recharts-responsivecontainer-height-100-renders-no-svg-at-all-in-a-flex-parent-with-no-explicit-5aff8987563b
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: recharts, responsivecontainer, css, flexbox

Give the element wrapping <ResponsiveContainer width="100%" height="100%"> an explicit height (e.g. height:300), or use `aspect={2}` instead of height="100%". With a flex row parent (`display:flex`, child `flex:1`) and no height, the production page (recharts 3.10.1, next 16.4.6) rendered no `svg.recharts-surface` at all. With the flex child at height:300 the svg measured 300px high; with a 300px-high wrapper and `aspect={2}` it measured 250px. Measured with Playwright headless Chromium at 800x600. I did not test grid parents.
