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

283
Vistas
Error when changing data after migrating to vue-chartjs 4

I am migrating from vue-chartjs 3 to 4. I have a LineChart component that I migrated to the last version of VueChart (I put the template section and removed the draw method calls.

This component is used for 2 charts. When I close the first one and want to display the second one, I have a console error:

[Vue warn]: Error in callback for watcher "chartData": "TypeError: Cannot read properties of undefined (reading 'destroy')"

What can be the problem here?

Thanks!

<template>
  <line :chart-data="chartData" />
</template>

<script>
import 'chart.js/auto'
import { Line } from 'vue-chartjs/legacy'

export default {
  name: 'AppLineChart',
  components: { Line },
  props: {
    chartData: {
      type: Object,
      required: true,
    },
}
</script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The same happened to me, i render my charts in mounted, the solution to me was put my render of the second chart in created instead mounted, i don´t know what happend but the error disappeared :/

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