Setting height of a chart in Apexcharts

Viewed 9221

I am trying to set the height of a chart in Apexcharts, but it seems to only work in responsive mode, no matter what I try.

Any idea?

Here is a Codesandbox (it's the basic example from their docs, plus I added a height). Thanks for any help.

1 Answers

You need to add the height to the actual Chart component like the width that has already been set in your example.

Here's an example of setting the height to 100px

<Chart options={this.state.options} series={this.state.series} type="bar" width="500" height="100" />

Documentation - Props

enter image description here

Related