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

[Bug]: Options (parsing) not updating chart as expected #1043

Closed
1 task
emilsgulbis opened this issue Jun 8, 2023 · 1 comment
Closed
1 task

[Bug]: Options (parsing) not updating chart as expected #1043

emilsgulbis opened this issue Jun 8, 2023 · 1 comment

Comments

@emilsgulbis
Copy link
Contributor

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Chart update is triggered using out of date options
See reproduction

Reproduction

https://stackblitz.com/edit/github-sqadrd?file=src%2FApp.vue

chart.js version

^4.0.0

vue-chartjs version

^5.0.0

Possible solution

No response

@emilsgulbis
Copy link
Contributor Author

Meanwhile the workaround is

watch(() => chartOptions, () => {
  const { value: { chart }} = chartRef
  if (!chart) return

  nextTick(() => {
    chart.update()
  })
})

apertureless pushed a commit that referenced this issue Jul 7, 2023
* Use nextTick to apply chart props change

Related to #1043

* Add nextTick import
lu0415mc pushed a commit to lu0415mc/vue-chartjs that referenced this issue Feb 24, 2024
* Use nextTick to apply chart props change

Related to apertureless/vue-chartjs#1043

* Add nextTick import
RichardCarlrich pushed a commit to rahasiasutarto/vue-chartjs that referenced this issue Jan 21, 2025
* Use nextTick to apply chart props change

Related to apertureless/vue-chartjs#1043

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

No branches or pull requests

2 participants