如何使Apex图表反应饼杆厚

发布于 2025-01-31 06:40:01 字数 618 浏览 3 评论 0 原文

我如何使钢筋更厚?

import React from "react";
import Chart from "react-apexcharts";

 const series = [44, 55, 41, 17, 15];
 const options = {
 chart: {
 type: "donut"
 }
 };

 export default function PieChart() {
 return (
  <div>
  <Chart options={options} series={series} type="donut" height={300} />
  </div>
 );
 }

*沙盒样本在这里 https://codesandbox.io/s/vigilant-pateu-tv4t5q?file=/src/app/app.tsx * *

How do i make the bar thicker?

import React from "react";
import Chart from "react-apexcharts";

 const series = [44, 55, 41, 17, 15];
 const options = {
 chart: {
 type: "donut"
 }
 };

 export default function PieChart() {
 return (
  <div>
  <Chart options={options} series={series} type="donut" height={300} />
  </div>
 );
 }

*sandbox sample here https://codesandbox.io/s/vigilant-pateu-tv4t5q?file=/src/App.tsx *

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何止钟意 2025-02-07 06:40:01

使用 plotOptions-&gt;派 - &gt;甜甜圈 - &gt;尺寸增加或减小甜甜圈尺寸。增加甜甜圈尺寸将降低条形宽度&amp;反之亦然。更新 codesandbox

const options = {
  chart: {
    type: "donut"
  },
  plotOptions: {
    pie: {
      donut: {
        size: "25%"
      }
    }
  }
};

use plotOptions -> pie -> donut --> size to increase or decrease the donut size. Increasing the donut size would decrease the bar width & vice versa. Updated codesandbox

const options = {
  chart: {
    type: "donut"
  },
  plotOptions: {
    pie: {
      donut: {
        size: "25%"
      }
    }
  }
};
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文