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

217
Views
How to call API or access data in Highchart's click function in Angular

I am using PIE chart using Highcharts library. I need to call another API when PIE chart is clicked and show another Piechart based on click.

If I use Javascript function I am able to access the data using click function below.

plotOptions-->series-->point-->events--click

plotOptions: {
series: {
  stacking: 'normal',
  dataLabels: {
    enabled: true,
    align: 'left',
    color: '#FFFFFF',
    x: 0
  },
  point: {
    events: {
      click: function(te) {
        console.log(this.category);
        console.log(this.y);
      }
    }
  }
},

Issue I am facing with typescript (in Angular) I am unable to access data inside click function. Below I am unable to access this.category and this.y. Gives error on console. Note: I can't use Javascript function since I won't be able to access any variable or call any API.

events: {
            click: (event) => {                    
              console.log(this.category);
              console.log(this.y);
            }            
          }      
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!