ResponsiveContainer not loading charts
See original GitHub issueWhen i try using <ResponsiveContainer width="100%" height={400}>
my charts are not appearing.
Also when i try giving width in % for BarChart or PieChart or any other im getting any error width is NaN string is passed.
here is my code:
<ResponsiveContainer width="100%" height={200}>
<BarChart width={300} height={200} data={data} margins = {{ top: 50, right: 0, bottom: 100, left: 0 }} >
<XAxis dataKey="monthName" />
<YAxis />
<CartesianGrid />
<Legend />
<Tooltip />
<Bar dataKey="transactions" fill="#7B1FA2" />
</BarChart>
</ResponsiveContainer>
can you please tell me where am i doing wrong or something to do with your side.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Rechart Responsive container does not render - Stack Overflow
Im trying to render a bar chart to fit ...
Read more >ResponsiveContainer | Recharts
A container component to make charts adapt to the size of parent container. One of the props width and height should be a...
Read more >pie-chart-in-responsive-container - CodeSandbox
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >[Solved]-Rechart Responsive container does not render-Reactjs
For anybody rendering the chart inside a react-bootstrap component, don't use the ResponsiveContainer tag. you can simple use the logic inside of it...
Read more >How to use the recharts.Scatter function in recharts - Snyk
streamlit / streamlit / frontend / src / components / elements / Chart / Chart.tsx View on ... ResponsiveContainer, <- not implemented Area:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vikkya this solves your problem: https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
Just wrap your ResponsiveContainer with this below (the paddingBottom will define the proportion of your container (a square, a rectangle etc.):
@vikkya Just guarantee the width of parent node.