current position:Home>The data requested by Axios in vue3 is put into ecarts, which always shows that setoption is not defined

The data requested by Axios in vue3 is put into ecarts, which always shows that setoption is not defined

2022-02-03 00:49:28 CSDN Q & A

Problems encountered :

img

File layout :

img

Main component code :

img

img

vue.config.js Code content :

img

data.json Code content :

img

option.js The content of :

img

I probably think there's something wrong with my code , Because I just learned !




Refer to the answer 1:

img


This should be a point




Refer to the answer 2:



Refer to the answer 3:

Print once myChart have a look




Refer to the answer 4:



Refer to the answer 5:

I want to vue3 Use in the project axios obtain json The data in the file , Then introduce the data into echarts in , Please give advice or comments !




Refer to the answer 6:



Refer to the answer 7:

Yes, it can run , But the browser reports an error Show Unable to read undefined property ( Read 'data')

img




Refer to the answer 8:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202030049245187.html

Random recommended