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

250
Vistas
Panning no funciona al pasar el mouse sobre las líneas - plotly js

La panorámica no funciona mientras se desplaza sobre un marcador.

Para reproducir el problema, verifique el código a continuación -> seleccione pan -> desplace el cursor sobre un marcador -> arrastre la trama -> la trama vuelve a su posición original.

 var data = [{ mode: "lines+markers", x:["December", "January", "February"], y:[4,1,3] }] Plotly.react('myDiv', data).then(gd => { gd.on('plotly_hover', d => { var width_vals = gd.data.map(x => 5) Plotly.restyle(gd, 'line.width', width_vals) }).on('plotly_unhover', d => { var width_vals = gd.data.map(x => 1) Plotly.restyle(gd, 'line.width', width_vals) }) })
 <head> <!-- Load plotly.js into the DOM --> <script src='https://cdn.plot.ly/plotly-2.12.1.min.js'></script> </head> <body> <div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div> </body>

ejemplo

¡Cualquier sugerencia sera apreciada!

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Intente configurar xaxis.uirevision en cualquier valor real y manténgalo igual entre renderizaciones. Consulte https://plotly.com/javascript/reference/layout/#layout-uirevision

 var data = [{ mode: "lines+markers", x:["December", "January", "February"], y:[4,1,3] }] Plotly.react('myDiv', data).then(gd => { gd.on('plotly_hover', d => { var width_vals = gd.data.map(x => 5) Plotly.restyle(gd, { 'line.width': width_vals, 'xaxis.uirevision': 'anyvalue' }) }).on('plotly_unhover', d => { var width_vals = gd.data.map(x => 1) Plotly.restyle(gd, { 'line.width': width_vals, 'xaxis.uirevision': 'anyvalue' } ) }) })
 <head> <!-- Load plotly.js into the DOM --> <script src='https://cdn.plot.ly/plotly-2.12.1.min.js'></script> </head> <body> <div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div> </body>

about 4 years ago · Santiago Trujillo 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