Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

417
Vistas
Show percentage value on doughnut chart on hover(tooltip) in ng2-charts Angular

I am using Angular 9 with ng2-charts and chartjs-plugin-datalabels for rendering my data on chart.

Problem: I am rendering Doughnut chart with 5 categories. I am able to show percentage value in chart but when user hovers on any category instead of showing percentage on tooltip it is showing actual value. I am not sure how to resolve this. Below is my code sample.

I tried this url: ng2-chart: How to show percentage values inside the chart?

But this didnt worked for me.

Doghnut chart Image

pieChartPlugins:[] =[]
    pieChartLegend:boolean = true;
    pieChartType = "doughnut"
    pieChartData =[0,0,0];
    pieChartLabels = [];
    pieChartOptions = {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          labels: {
            render: 'percentage',
            fontColor: ['black', 'black', 'black'],
            precision: 2,
          }
        },
        legend: {
          position: 'bottom',
          labels: {
            fontColor: "black",
            boxWidth: 15,
            padding: 10,
            fontFamily: 'Poppins ',
            fontSize: 12,
          },  
        },
        animation: {
          animateScale: true,
          animateRotate: true
        }
    };
    isPieChartPercentage :boolean = true;
    pieChartColors = [
        {
          backgroundColor: [
            'rgb(144, 238, 144)',
            '#ADD8E6',
            '#ffff80',
            '#e0eafc',
            '#f0b961',
            'black'
          ]
        }
    
      ]

Any help will be very much appreciated. Thanks.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda