highcharts / highcharts-vue

Other
686 stars 150 forks source link

support: redraw after secondary callback? #172

Closed mooseh closed 3 years ago

mooseh commented 3 years ago

I am using the callback like so: <highcharts ref="chart" :options="chart.options" :callback="getChartData"></highcharts>

and I have a function that is called by a form to update the timeframes and run the callback again, but when calling the callback again the data appears perfectly find but the animation doesn't happen, could I get an example of how I can set the data and redraw.

here is my callback

                this.loading.graph = true;
                axios.get(this.link, {
                    params: {
                        from: this.from,
                        to: this.to,
                        timezone: this.timezone,
                    }
                }).then(response => {
                    this.chart.options.series[0].data = response.data.data;
                    this.chart.options.series[1].data = response.data.percentile;
                    this.chart.options.series[2].data = response.data.avg;
                }).finally(() => {
                    this.loading.graph = false;
                })
            },

thanks

Denyllon commented 3 years ago

Hi @mooseh ,

Thank you for your report, and appreciate that you are using our product. Could you provide me with the minimal example, where the problem is noticed (CodeSanbox or Stackblitz platforms preferred)? It would be much easier to find out what is happening, or what could be the reason.

You can start to reproduce the issue from here: https://codesandbox.io/s/highcharts-vue-demo-ttner

Kind regards!

Denyllon commented 3 years ago

Closed due to inactivity.