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

233
Vistas
How to dynamically change mouse event functions in Highchart?

I'm using Highchart networkgraph for a directed graph.

I want the users to be able to on node hover highlight the shortest path from the start node. I also have some checkboxes that would highlight the shortest node from start to the specified node. I've managed to do it. but the bit I'm having some issue with is that upon selecting a checkbox I want to 'disable' the BFS algorithm, keeping the highlighted path and letting the user explore the nodes (each node has a tooltip popup as well on hover)

I've made a small demo that showcases my issue. Demo

I've tried to disable all states (inactive, hover, selected) and update each marker with the node.update() method, but without success. I've also tried to change the point.events in the chartOptions state to undefined or to another function, but then the default states interfere with the functionality. I've ran out of ideas.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

For disabled all state you can use enableMouseTracking: false, which will turn off all states. https://api.highcharts.com/highcharts/plotOptions.networkgraph.enableMouseTracking

  const updateSeries = () => {
    setChartOptions({
      series: [
        { 
          enableMouseTracking: false,
          data: [Math.random() * 5, 2, 1] 
        },
        { 
          data: [Math.random() * 5, 2, 1] 
        },
      ]
    });
  };

https://stackblitz.com/edit/react-ewhvow?file=index.js

Another option would be to add an event in series, events.mouseOut, events.mouseOver, and there change the state of the marker to visible or not.

https://jsfiddle.net/BlackLabel/shxo8Lj6/

about 4 years ago · Juan Pablo Isaza Denunciar
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