Accepted answer

you need to notify the child component to re-render itself. add a watcher is one way, watch the data change and update it.

another easier way is, add a key prop to it.

in your app.vue, do like this:

 <linechart :chart-data="downloads" :chart-labels="labels" :key="downloads.length"/>

here i'm using the downloads's length as key value. it's a simple and temp resolution to show you how to use key. in your app you should use some other value as key, incase different api call returns same length data.

you can also set the key to another value, and change this value every time you call the api.

Related Query

More Query from same tag