Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

331
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda