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

149
Visualizações
How to reduce line height at center of the doughnut chart Chart.js

I intend to reduce the line height of two text at the center of doughnut chart. Plus, I want to reduce font size of the second text. I am using Chart.js version 2.9.4.

This is part of the code of the doughnut chart.

        cutoutPercentage: 80,
        maintainAspectRatio: false,
        elements: {
            center: {
                // the longest text that could appear in the center
                maxText: '100%',
                text: total_vuln,
                text1: 'Total',
                fontColor: '#4b69a7',
                // fontFamily: "'Roboto'",
                // fontStyle: 'normal',
                fontSize: 20,
                // if a fontSize is NOT specified, we will scale (within the below limits) maxText to take up the maximum space in the center
                // if these are not specified either, we default to 1 and 256
                minFontSize: 1,
                maxFontSize: 256,
            }
        },

Image of the chart

about 4 years ago · Juan Pablo Isaza
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