Commit c3fa1566 by xinla

chart 图表完善

1 parent 4d05dbde
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
}, },
methods: { methods: {
drawChart() { drawChart() {
if (!(this.series && this.series.length)) { if (!(this.xData?.length && this.series?.length)) {
return return
} }
// eslint-disable-next-line // eslint-disable-next-line
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
}, },
methods: { methods: {
drawChart() { drawChart() {
if (!(this.series && this.series.length)) { if (!(this.xData?.length && this.series?.length)) {
return return
} }
// eslint-disable-next-line // eslint-disable-next-line
......
...@@ -50,6 +50,9 @@ export default { ...@@ -50,6 +50,9 @@ export default {
methods: { methods: {
drawChart() { drawChart() {
// eslint-disable-next-line // eslint-disable-next-line
if (!this.series?.length) {
return
}
this.myChart = echarts.init(this.$refs.chart) this.myChart = echarts.init(this.$refs.chart)
let option = { let option = {
color: echartColors, color: echartColors,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!