...
|
...
|
@@ -48,14 +48,14 @@ export default { |
|
|
const colorArr1 = [
|
|
|
'rgba(151,213,244, 0.8)',
|
|
|
'rgba(239,224,167, 0.8)',
|
|
|
'rgba(229,171,209, 0.8)',
|
|
|
'rgba(119,250,162, 0.8)',
|
|
|
'rgba(151,170,255, 0.8)'
|
|
|
]
|
|
|
// 全透明的颜色值
|
|
|
const colorArr2 = [
|
|
|
'rgba(151,213,244, 0)',
|
|
|
'rgba(239,224,167, 0)',
|
|
|
'rgba(229,171,209, 0)',
|
|
|
'rgba(119,250,162, 0)',
|
|
|
'rgba(151,170,255, 0)'
|
|
|
]
|
|
|
|
...
|
...
|
@@ -153,7 +153,7 @@ export default { |
|
|
areaStyle: {
|
|
|
// color:'rgba(151,213,244,0.4)',
|
|
|
normal:{
|
|
|
color:new echarts.graphic.LinearGradient(0, 0, 0, .6, [{ //关键在这里, 设置面积渐变
|
|
|
color:new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ //关键在这里, 设置面积渐变
|
|
|
offset: 0,
|
|
|
color: colorArr1[index] //这里是我设置的渐变的颜色从线条颜色变为透明
|
|
|
}, {
|
...
|
...
|
@@ -187,6 +187,13 @@ export default { |
|
|
trigger: 'axis',
|
|
|
backgroundColor:'rgba(50,50,50,0.7)',
|
|
|
borderColor:"#333",
|
|
|
formatter:function(params){
|
|
|
let str='<div>'+params[0].name+'</div>';
|
|
|
for(let i=0;i<params.length;i++){
|
|
|
str+="<div style='display:flex;justify-content: space-between'><span>"+params[i].marker+params[i].seriesName+"</span><span style='margin-left:10px;'>"+params[i].data+"个</span></div>"
|
|
|
}
|
|
|
return str
|
|
|
},
|
|
|
textStyle:{
|
|
|
color:"#fff",
|
|
|
align:'left'
|
...
|
...
|
@@ -196,7 +203,7 @@ export default { |
|
|
legend: {
|
|
|
data: proxy.legendData,
|
|
|
itemHeight:0,//图例圆圈大小设置
|
|
|
y:'7px',
|
|
|
y:'0px',
|
|
|
textStyle: {
|
|
|
color: '#ffffff',
|
|
|
fontsize:"12px"
|
...
|
...
|
@@ -204,10 +211,10 @@ export default { |
|
|
|
|
|
},
|
|
|
grid: {
|
|
|
top:'2%',
|
|
|
top:'10%',
|
|
|
left: '3%',
|
|
|
right: '4%',
|
|
|
bottom: '30%',
|
|
|
bottom: '20%',
|
|
|
containLabel: true,
|
|
|
},
|
|
|
xAxis: {
|
...
|
...
|
|