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

412
Views
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
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!