akmur
akmur

Reputation: 1635

Setting height of a chart in Apexcharts

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.

Upvotes: 8

Views: 30325

Answers (1)

Shoejep
Shoejep

Reputation: 4849

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

Upvotes: 15

Related Questions