Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'transition' of null #597

Closed
ghost opened this issue Jan 26, 2020 · 2 comments
Closed

Uncaught TypeError: Cannot read property 'transition' of null #597

ghost opened this issue Jan 26, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 26, 2020

Expected Behavior

Show a Chart

Actual Behavior

Gives an Error if I'm opening the Modal (Bootstrap-Vue) with chart component SECOND time.

// Error
Uncaught TypeError: Cannot read property 'transition' of null
    at Chart.transition (Chart.js?30ef:9848)
    at Chart.draw (Chart.js?30ef:9810)
    at Chart.render (Chart.js?30ef:9782)
    at Object.callback (Chart.js?30ef:2204)
    at Object.advance (Chart.js?30ef:3528)
    at Object.startDigest (Chart.js?30ef:3501)
    at eval (Chart.js?30ef:3490)

// Line Chart component
<script>
import { Line } from "vue-chartjs";

export default {
  extends: Line,
  props: {
    chartdata: {
      type: Object,
      default: null
    },
    options: {
      type: Object,
      default: null
    }
  },
  mounted() {
    this.renderChart(this.chartdata, this.options);
  }
};
</script>

Environment

  • vue.js version: 3.5.2
  • vue-chart.js version: 3.5
  • npm version: 6.9.0
@Borderliner
Copy link

Same. This is getting on my nerves really.

@apertureless
Copy link
Owner

Have you checked the other closed issues?
Seems to be a duplicate:

#528
#241

And its also not very helpful to just post your component without any context.
99% of the time the component itself isn't the issue. Its mostly the parent component. How you fetch data, how you pass data, show/hide the component and so on.

A runable reproduction would be helpful (codesandbox, jsfiddle, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants