Closed FilipeamTeixeira closed 5 years ago
Hi @FilipeamTeixeira ,
Thank you for contacting us. Your button does not work properly due to fact that changes on the options
prop within Rose
component are not watched at all. You need to handle changes on the value of that prop using Vue's watch
definition, like in example below:
watch: {
options: {
handler(newOptions) {
this.chartOptions.series = newOptions.series
},
deep: true
}
},
Live example: https://codesandbox.io/s/vue-template-3j6dw
Kind regards, and sorry for a bit of late in reply!
I'm trying to dynamically update data in highchairs. On the long term the idea is to have a dropdown list but for now I'm focusing on just having a button working properly.
https://codesandbox.io/s/vue-template-ub45g
It's a custom made graph so there's a lot of data going into the series. So far, I have a file with the chart (i.e. Rose.vue), and an App.vue file. In the App.vue I have two variables (just as an example), original and updatedData. In theory if I would press the button, it should update the series to the updatedData. However, whenever I press it nothing happens. The data is fine, as if I change the series manually in the code, the chart is updated. However, I'm not sure why the button isn't doing what it is supposed to do.
The code is below, but it's better to check the codesandbox example.