I have this chart which I try to make responsive.
The original size is width: 800px
and height: 400px
I am trying to make it responsive and dependant on the size of the parent div
.
- First when I change the width
and height
to 100%, the chart size actually reduces to full width but only 156px of height.
- Second, when I add to the svg
element the attribute viewBox= 0 0 100 100
, it completely disturbs the size of the different elements, with only the YAxis labels being seen/drawn.
Any idea on how I should modify this, to make it dependant on the size of the parent div
?