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

218
Vistas
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
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