The problem of introducing echart to call its graphic method to report an error in a vue project

index.js introduces echart
clipboard.png
echart


clipboard.png

the console mistakenly reported that graphic is not defined. May I ask what went wrong

?
Mar.15,2021

1. First register the prototype chain in main, that is, Vue.prototype.$echarts = echarts
2. Use color: new this.$echarts.graphic.LinearGradient to call


you can try to rewrite color: new echarts.graphic.LinearGradient in this way


have you solved


after the main.js reference, you should also call import echarts from "echarts" on the page, which can set the shadow gradient on the page.


normal: {
color: function (params) {
return {
colorStops: [{
offset: 0, / / the starting position of the color
color:'- sharp29facb' / / 0% color
}, {
offset: 0.6, / / Color ending
color:'- sharp17a7fd' / / 100% Color
}]
}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b0b9-33e2e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b0b9-33e2e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?