Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
How to remove space below semi donut chart in Apexcharts?

I am trying to show semi donut chart using Apexcharts. I want it to be responsive so I've set its height and width to auto, but it is still taking so much of extra space after donut and it's effecting my whole dashboard. Any idea how to remove this extra space?

Here's my current chart configuration.

      const options: ApexOptions = {
    chart: {
      type: "donut",
      height: "auto",
      width: "auto",
      parentHeightOffset: 0,
      sparkline: {
        enabled: true,
      },
      redrawOnWindowResize: true,
      redrawOnParentResize: true,
      events: {
        mounted: chart => {
          chart.windowResizeHandler()
        },
      },
    },
    stroke: {
      width: 0,
    },
    labels: labels,
    plotOptions: {
      pie: {
        startAngle: -90,
        endAngle: 90,
        donut: {
          size: "65%",
          background: "transparent",
          labels: {
            show: true,
            name: {
              show: false,
            },
          },
        },
      },
    },
    grid: {
      padding: {
        left: 0,
        right: 0,
        bottom: 0,
      },
    },
    dataLabels: {
      enabled: false,
    },
    legend: {
      show: false,
    },
  }
  return (
    <div className="chart" style={{ height: "auto", width: "auto" }}>
      <ReactApexChart options={options} series={series} type="donut" />
    </div> )

Here's how it is showing right now

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

I think, specifying the height and width in the parent container will help you in your case like this.

<div className="chart" style={{ height: "50px", width: "50px" }}>
   <ReactApexChart options={options} series={series} type="donut"  height="100%" width="100%" />
</div>

and remove height and width form you chart Options

chart: {
   type: "donut",
   parentHeightOffset: 0,
   sparkline: {
      enabled: true,
   },
   ...
}
about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!