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

artfulrobot picture artfulrobot  路  3Comments

EroTiXx picture EroTiXx  路  3Comments

ismaildervisoglu picture ismaildervisoglu  路  3Comments

jeroenpol picture jeroenpol  路  3Comments

felixalguzman picture felixalguzman  路  3Comments