提交 1f88522f authored 作者: lihuihui's avatar lihuihui

修改bug

上级 6e9f725d
...@@ -117,87 +117,171 @@ export default { ...@@ -117,87 +117,171 @@ export default {
data1.push(item.score) data1.push(item.score)
data2.push(this.getNowTime(item.date_index)) data2.push(this.getNowTime(item.date_index))
}) })
this.polar = { if (data2.length > 1) {
dataZoom: [{ this.polar = {
type: 'inside', dataZoom: [{
start: 0, type: 'inside',
end: 50 start: 0,
}], end: 50
grid: { }],
x: 30, grid: {
y: 20, x: 30,
x2: 0, y: 20,
y2: 30
},
itemStyle: {
// color: 'linear-gradient(0deg, #00A2DB, #35D0E9)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0, x2: 0,
y2: 1, y2: 30
colorStops: [{
offset: 1, color: '#00A2DB'
}, {
offset: 0, color: '#35D0E9'
}],
global: false // 缺省为 false
}
},
xAxis: {
type: 'category',
data: data2,
axisLabel: {
color: 'rgba(255,255,255,0.3)'
}, },
axisLine: { itemStyle: {
show: false // color: 'linear-gradient(0deg, #00A2DB, #35D0E9)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 1, color: '#00A2DB'
}, {
offset: 0, color: '#35D0E9'
}],
global: false // 缺省为 false
}
}, },
axisTick: { xAxis: {
show: false type: 'category',
data: data2,
axisLabel: {
color: 'rgba(255,255,255,0.3)'
},
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: ['#D4D4D8'],
opacity: 0.1
}
}
}, },
splitLine: { yAxis: {
lineStyle: { // minInterval: 50,
color: ['#D4D4D8'], // interval: 50,
opacity: 0.1 splitNumber: 3,
type: 'value',
axisLabel: {
color: 'rgba(255,255,255,0.3)'
},
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: ['#D4D4D8'],
opacity: 0.1
}
} }
}
},
yAxis: {
// minInterval: 50,
// interval: 50,
splitNumber: 3,
type: 'value',
axisLabel: {
color: 'rgba(255,255,255,0.3)'
}, },
axisLine: { series: [{
show: false data: data1,
type: 'line',
symbol: 'none',
smooth: true,
itemStyle: {
normal: {
lineStyle: {
width: 3
}
}
}
}]
}
} else {
this.polar = {
dataZoom: [{
type: 'inside',
start: 0,
end: 50
}],
grid: {
x: 30,
y: 20,
x2: 0,
y2: 30
}, },
axisTick: { itemStyle: {
show: false // color: 'linear-gradient(0deg, #00A2DB, #35D0E9)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 1, color: '#00A2DB'
}, {
offset: 0, color: '#35D0E9'
}],
global: false // 缺省为 false
}
}, },
splitLine: { xAxis: {
lineStyle: { type: 'category',
color: ['#D4D4D8'], data: data2,
opacity: 0.1 axisLabel: {
color: 'rgba(255,255,255,0.3)'
},
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: ['#D4D4D8'],
opacity: 0.1
}
} }
} },
}, yAxis: {
series: [{ // minInterval: 50,
data: data1, // interval: 50,
type: 'line', splitNumber: 3,
symbol: 'none', type: 'value',
smooth: true, axisLabel: {
itemStyle: { color: 'rgba(255,255,255,0.3)'
normal: { },
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
lineStyle: { lineStyle: {
width: 3 color: ['#D4D4D8'],
opacity: 0.1
}
}
},
series: [{
data: data1,
type: 'line',
smooth: true,
itemStyle: {
normal: {
lineStyle: {
width: 3
}
} }
} }
} }]
}] }
} }
this.$forceUpdate() this.$forceUpdate()
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论