【问题标题】:(ApexCharts) How can I make the pie chart the same size?(ApexCharts) 如何使饼图大小相同?
【发布时间】:2022-07-28 18:32:52
【问题描述】:

我的问题:图表大小是固定的,包括图例。

我想固定除图例之外的饼图大小。 如何使饼图大小相同?

这是我的代码。 请帮帮我

var options = {
          series: [25, 15, 44],
          chart: {
            type: 'pie', 
            **width: '300px'**
        },
        labels: ["Monday", "Tuesday", "Wednesday"],
        theme: {
          monochrome: {
            enabled: true,
            color: '#f38200',
            shadeIntensity: 0.9
          }
        },
        plotOptions: {
          pie: {
            size : "200px"
          }
        },
        stroke: {
          show: false
        },
        dataLabels: {
          enabled: false
        },
        legend: {
            position: 'bottom',
            horizontalAlign: 'left',
            markers: {
                width: 9, height: 9
            },
            itemMargin: {
                horizontal: 20, vertical: 0
            },
            formatter: function(seriesName, opts) {
              ~~~~~~~
              return legend;
            }
          }
        };

IMG - This is my problem

【问题讨论】:

    标签: charts legend apex apex-code apexcharts


    【解决方案1】:

    尝试使用 - 传奇: { 浮动:真 } 并使用偏移量设置图例的位置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-07
      • 2021-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-15
      • 2023-01-28
      • 1970-01-01
      相关资源
      最近更新 更多