How to increase the width of the bars in an Apex chart's pie chart

Is there a way to increase the thickness of the bar?

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>
 );
 }

*check out this sandbox sample for reference https://codesandbox.io/s/vigilant-pateu-tv4t5q?file=/src/App.tsx *

Answer №1

utilize the property

plotOptions -> pie -> donut --> size
to adjust the size of the donut chart. By increasing the donut size, you will decrease the width of the bars and vice versa. Check out the updated codesandbox example

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

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Incorporate additional plugins into React-Leaflet for enhanced functionality

I'm currently working on developing a custom component using react-leaflet v2, where I aim to extend a leaflet plugin known as EdgeMarker. Unfortunately, the documentation provided lacks sufficient details on how to accomplish this task. In response, ...

reveal.js: Upon a fresh installation, an error has been encountered: ReferenceError - 'navigator'

Currently, I am attempting to integrate reveal.js into my React.js/Next.js website using the instructions provided at However, upon implementation, I encountered the following error: Server Error ReferenceError: navigator is not defined This error occurr ...

Issues with loading NextJS videos can occur when accessing a page through a link, as the videos may fail to load without

Issue Greetings. The problem arises when attempting to load muse.ai videos on-page, specifically when accessing the page with a video embedded through a NextJS link. To showcase this issue, I have provided a minimal reproducible example on StackBlitz her ...

The directory "Users/node_modules/crypto-browserify" is not a valid directory in react

After discovering the package crypto-browserify on GitHub, I attempted to integrate it into my React Native project. Following the command npm install --save crypto-browserify, I then imported it using var crypto = require('crypto-browserify');. ...

Fixed position scrollable tabs with Material UI

I recently implemented material-ui scrollable tabs in my project, referencing the documentation at https://mui.com/material-ui/react-tabs/#scrollable-tabs. Here is a snippet of the code I used: <Tabs value={value} onChange={handleChange ...

What is the best method to implement real-time data updates in a single page application

Looking for a solution to update the data in my SPA web app that utilizes next js and express js. How can I ensure the application on computer 1 reflects changes made by computer 2 without requiring a manual refresh? ...

React router showing a component unexpectedly

I thought that after implementing React Router, my website would only display components when the Route path matches the URL. However, I'm facing an issue where the Invoices component is still rendering even though the URL is '/'. How can I ...

I'm curious why my setState function seems to be returning an array instead of updating the state directly in my React component. And then

In the following code snippet, an attempt is made to verify whether a URL is accessible or not. The URLs to be verified are stored in a state called trackedUrls. The state is updated using an asynchronous function named checkAll. Before the update, the o ...

Recreating the MUI v5 Popper scrolling feature in a CodeSandbox playground

I'm trying to locate the reference code for MUI v5 Popper scroll playground in order to address some issues I'm experiencing with the dynamic arrow within the popper. Unfortunately, the arrow is not behaving dynamically as expected. Click here ...

What is the best way to display JSON data in a readable format?

I received a JSON file with the following structure: { "data":{ "uuid":"123", "name":"TestData", "alias":null, "created_at":"2021-03-17T11:57:29.000000Z&q ...

A special custom hook that returns a Promise, which then resolves within the useEffect

I'm currently working on creating a hook that can dynamically import and return a Promise that resolves once the import is done. Here's an example of how I intend for it to be used: await useAfterImport("@custom/path"); Unfortunately, my initia ...

What are some methods for singling out a specific table row?

When working on my app, I faced the task of importing a JSON file and displaying its contents in a table with 3 columns. However, there are two main issues that arose: Utilizing array index for the row key is not recommended due to the table also having ...

TypeScript struggling to recognize specified types when using a type that encompasses various types

I have a defined type structure that looks like this: export type MediaProps = ImageMediaProps | OembedProps; Following that, the types it references are defined as shown below: type SharedMediaProps = { /** Type of media */ type: "image" | "oembed"; ...

React: Introducing the latest router feature post-login

I'm facing an issue with the Router in React. After a successful login, I am changing the type state in Redux from 0 to 1. However, when I try to make a switch in my App file, I encounter an error. Warning: [react-router] You cannot change <Router ...

Why is the type of parameter 1 not an 'HTMLFormElement', causing the failure to construct 'FormData'?

When I try to execute the code, I encounter a JavaScript error. My objective is to store the data from the form. Error Message TypeError: Failed to create 'FormData': argument 1 is not an instance of 'HTMLFormElement'. The issue arise ...

Help with Material-UI: Passing unique props to a custom TreeItem component

I am trying to pass an argument category to the component CustomTreeItem which uses TreeItemContent. Documentation: https://mui.com/ru/api/tree-item/ import TreeItem, { TreeItemProps, useTreeItem, TreeItemContentProps, } from '@material-ui/lab ...

Following the npm update, encountering errors with webpack

Upgrading the npm package to version 8.2.0 has caused issues in my React application. Here is a screenshot of the problem: https://i.stack.imgur.com/noQIz.png These are the error messages I see in the console: [HMR] Waiting for update signal from WDS.. ...

Tips for preventing the initial default effect in UseEffect

I've added a new feature where clicking a button triggers an alert saying 'you have clicked'. However, the alert pops up as soon as the page loads and I don't want that. I'd like the alert to only appear when the count reaches 1 or ...

Leveraging Next Js with an external REST API for streamlined authentication and authorization functionality

I am currently working on transitioning my existing application that was developed with Node.js and Express, along with a front end built using create-react-app with Redux, to Next.js. However, I have hit a roadblock as I am unsure of the correct method ...

Enhancing the appearance of a JSX component in React

I have a segment of code within my project that calculates a specific percentage and displays it on the dashboard. <text className="netProfit-circle-text" x="50%" y="50%" dy=".2em" textAnchor="middl ...