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

148
Vistas
Is there a way to update the Doughnut chart of Chart.js but not lose the tooltip

I'm working with Chart.js. When I mouse over one piece on Doughnut chart, I want to make less opaque the other pieces and don't lose the tooltip. this is the chart's first version

This is what i want to do -- when i mouse over one piece, other pieces need to be less opaque When i try to do this on hover event, i need to change backgroundColor color and update the chart. It works, it is changing chart color but because i update the chart, i lose my tooltip.

options = {
  hover: {
    onHover: (e, item: any) => {
      if (item.length) {
        item[0]._chart.config.data.datasets[0].backgroundColor = ['#131e3a', '#19284d', '#1f3260']
        item[0]._chart.update();
      }
    }
  },

Is there any way to update the chart colors but not lose the tooltip?

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