Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vuejs my chart load before fetch data

Your issue is that API requests are async. So it happens that your chart will be rendered, before your API request finishes. A common pattern is to use a loading state and v-if.

There is an example in the docs: https://vue-chartjs.org/guide/#chart-with-api-data
 
PREVIOUS NEXT
Tagged: #vuejs #chart #load #fetch #data
ADD COMMENT
Topic
Name
3+9 =