Saigesp / vue-d3-charts

D3 charts for Vue
https://saigesp.github.io/vue-d3-charts/
GNU Lesser General Public License v2.1
97 stars 30 forks source link

this.chart.destroyChart is not a function getting this error. whenever i tried it. #16

Closed muntakim1 closed 3 years ago

muntakim1 commented 4 years ago

An error occured while showing the error page Unfortunately an error occured and while showing the error page another error occured

Error details: TypeError: this.chart.destroyChart is not a function

hoopyfrood commented 4 years ago

This occurs when data hasn't loaded yet. Make sure you fetch your data as early as possible in the lifecycle, ended up using "asyncData" in nuxt to make it work.

Saigesp commented 3 years ago

Hi @muntakim1, thanks for the report, and sorry for my late response.

I haven't tried this library with Nuxt, but as @hoopyfrood said (thanks you so much!), it's probably because the data isn't loaded yet.