【问题标题】:How to set fixed width of a bar chart column using apex chart react?如何使用顶点图表反应设置条形图列的固定宽度?
【发布时间】:2023-02-18 15:04:18
【问题描述】:

我正在尝试使用顶点图表设置条形图的列宽。 Fox 示例,每列宽度应为 50px,这是我的尝试:

options={{
        plotOptions: {
                bar: {
                        distributed: true,
                        columnWidth: "80%",
                        barHeight: "20%",
                    },
                },
                yaxis: {
                    labels: {
                        minWidth: 0,
                        maxWidth: 50,
                    },
                },
            }}

还有 codesandbox 链接:https://codesandbox.io/s/react-apexcharts-color-forked-27nw6r?file=/src/App.js

【问题讨论】:

    标签: javascript reactjs apexcharts


    【解决方案1】:

    设置配置 "plotOptions": {bar: { columnWidth: '100%' }}

    【讨论】:

      猜你喜欢
      • 2022-01-24
      • 2020-08-30
      • 1970-01-01
      • 2016-10-17
      • 2017-04-30
      • 2018-10-31
      • 1970-01-01
      • 1970-01-01
      • 2011-10-05
      相关资源
      最近更新 更多