smithalan92 / vue3-highcharts

Vue 3 component wrapper for Highcharts.js
https://smithalan92.github.io/vue3-highcharts/
MIT License
46 stars 9 forks source link

How to correctly update charts data via prop #5

Open lmachegger opened 3 years ago

lmachegger commented 3 years ago

I have a small webapp with Vue.js 3 that shows a Highcharts Chart and some statistics, with global buttons for time-filters (All, Year, Month, Week). The data of my Highchart chart needs to change, whenever one of the global buttons was pressed.

Displaying the initial data works fine, but when it comes to updating the charts data, it is really slow. That makes me think that I am doing something wrong with updating the data.

I created a minimal eproducible example on codesandbox: example It consists of a Chart.vue component, which gets its property "data" updated, when the button "Update Data" is pressed. The button can be toggled multiple times, and it will always take several seconds until the chart is updated.

Thanks!

letehaha commented 3 years ago

@lmachegger it never takes more than 200-300 ms to update the chart for me. Looks like there is only an issue with your machine resources -_-