0👍
Solved it by adding an intermediate div between container and chart:
<div
style={{
minHeight: 300,
paddingTop: "33.33333%",
position: "relative",
}}
>
<div
style={{
position: "absolute",
inset: 0,
}}
>
<Bar
style={{ width: "100%", height: "100%" }}
//data={...}
options={{
maintainAspectRatio: false,
}}
/>
</div>
</div>
Source:stackexchange.com