vuejs my chart load before fetch data

Solutions on MaxInterview for vuejs my chart load before fetch data by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "vuejs my chart load before fetch data"
Myron
24 Nov 2018
1Your 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.
2
3There is an example in the docs: https://vue-chartjs.org/guide/#chart-with-api-data