Apexcharts.js: Force chart to 100% of Parent's Div?

Created on 9 Aug 2018  路  1Comment  路  Source: apexcharts/apexcharts.js

Tried height: '100%', Is there any way to make the chart height-responsive?

Most helpful comment

If you do give height: 100%, the chart gets the parent element's height and sets the fixed height - which doesn't change when width changes.

So, setting height: 100% doesn't actually makes it responsive but makes the chart fill the available height which is set by parent div. It's more of a CSS configuration.

To make it responsive, only width: 100% should be set and height should be left out.

>All comments

If you do give height: 100%, the chart gets the parent element's height and sets the fixed height - which doesn't change when width changes.

So, setting height: 100% doesn't actually makes it responsive but makes the chart fill the available height which is set by parent div. It's more of a CSS configuration.

To make it responsive, only width: 100% should be set and height should be left out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dougnewnham picture dougnewnham  路  18Comments

astone2014 picture astone2014  路  15Comments

Vvelghe picture Vvelghe  路  15Comments

jimfilippou picture jimfilippou  路  23Comments

Epithumia picture Epithumia  路  17Comments