apexcharts - 在 Apexcharts 中设置图表的高度

标签 apexcharts

我正在尝试在 Apexcharts 中设置图表的高度,但无论我尝试什么,它似乎都只能在响应模式下工作。
任何的想法?
这是一个 Codesandbox (这是他们文档中的基本示例,另外我还添加了高度)。
谢谢你的帮助。

最佳答案

您需要添加 height到实际 Chart组件,例如您的示例中已经设置的宽度。
这是设置 height 的示例至 100px<Chart options={this.state.options} series={this.state.series} type="bar" width="500" height="100" />文档 - Props
enter image description here

关于apexcharts - 在 Apexcharts 中设置图表的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63148073/

相关文章:

javascript - ApexCharts.js : How to set fixed value for axis label in Line Chart

angular - 类型 'undefined' 不可分配给类型 'ApexAxisChartSeries | ApexNonAxisChartSeries'

javascript - Apexcharts 工具提示 - 如何为烛台图表添加额外数据?

javascript - Apexcharts 在渲染新系列之前删除旧数据系列

jquery - ApexCharts - 使用appendSeries 添加多个系列不起作用

apexcharts - Apexchart : how to rotate labels

javascript - 如何禁用 apexcharts 上的下载选项?

angular - 如何在 apexchart 上赋予不同的颜色?