Set height and width for responsive chart using recharts ( Barchart )

You need to use ResponsiveContainer for it to work. Also, use the percentage values without brackets.

<ResponsiveContainer width="95%" height={400}>
   // your chart
</ResponsiveContainer>

I used that and it worked just fine! 🙂

Source: Responsive Container Docs

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)