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

234
Vistas
Uncaught TypeError: can't access property "linkedParent", d is null [Highcharts React JS]

Hello ladies and gentleman, especially the Highcharts community.

I've been trying to update my pie chart in order to update it on mouseover but it gives me the following error:

Uncaught TypeError: can't access property "linkedParent", d is null

I am new into Highcharts but was curious why would it give me the following error. I have to be honest, it got me stumped, the expected behavior would be updating chart upon mouseover. Any help would be appreciated :)

export const DonutChart = ({
  total,
  title,
}) => {
  const [percentage, setPercentage] = useState(100);
  const [rawData, setRawData] = useState([
    {y: percentage, color: 'grey'},
  ]);
  const options = {
    chart: {
      renderTo: 'container',
      type: 'pie',
      width: 80,
      height: 80,
      spacing: [0, 0, 0, 0],
    },
    title: {
      text: '',
    },
    subtitle: {
      text: '',
    },
    credits: {
      enabled: false,
    },
    legend: {
      enabled: false,
    },
    plotOptions: {
      pie: {
        size: 80,
        innerSize: 45,
        shadow: false,
        dataLabels: [{
          enabled: false,
        }],
        states: {
          hover: {
            lineWidth: 0,
            halo: {
              size: 0,
            },
          },
        },
        events: {
          mouseOver: () => {
            let sum = 0;
            setRawData([
              {y: (3000 / total) * 100, color: '#EE76B0'},
              {y: (3000 / total) * 100, color: '#18D39B'},
              {y: ((total - 6000) / total) * 100, color: 'grey'},
            ]);
            setPercentage((6000 / total) * 100);
          },
          mouseOut: () => {
            setPercentage(100);
          },
        },
      },
    },
    tooltip: {
      enabled: false,
    },
    series: [{
      data: [...rawData],
    }],
  };

  return (
    <div className={styles.body}>
      <div className={styles.body__chart}>
        <HighchartsReact
          highcharts={Highcharts}
          options={options}
          constructorType="chart"
        />
        <p className={styles.body__chart__percentage}>{`${percentage}%`}</p>
      </div>
      <p className={styles.body__chart__title}>{title}</p>
    </div>
  );
};
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