"
for (var i = 0; i < param.length; i++) {
if (i > 0) {
resultTooltip += "
"
}
if (i == 0) {
unit = "$_unit1";
} else {
unit = "$_unit2";
}
resultTooltip +=
param[i].marker +
param[i].value + "
" + unit + ""
}
return resultTooltip
},
borderColor: "rgba(245, 245, 245, 0.8)",
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
legend: {
right: "4%",
data: ['Sales Amount', 'Refund Amount'],
icon: "circle",
selectedMode: false,
},
series: [{
name: 'Sales Amount',
data: [0.00, 0.00, 120.73, 0.03, 10, 0.03, 243.61],
type: 'line',
itemStyle: {
color: "rgba(116,41,201,1)"
},
lineStyle: {
width: 3.5,
},
smooth: 0.15,
showSymbol: false,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "rgba(116,41,201, 0.05)" // 0% 处的颜色
}, {
offset: 1,
color: "rgba(116,41,201, 0.01)" // 100% 处的颜色
}],
global: false // 缺省为 false
}
}
},
{
name: 'Refund Amount',
data: [0.00, 0.00, 0.00, 0.00, 17.96, 0.00, 0.00],
type: 'line',
itemStyle: {
color: "rgba(253,189,76,1)"
},
lineStyle: {
width: 3.5,
},
smooth: 0.15,
showSymbol: false,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "rgba(255,108,62, 0.2)" // 0% 处的颜色
}, {
offset: 1,
color: "rgba(255,108,62, 0.1)" // 100% 处的颜色
}],
global: false // 缺省为 false
}
}
}
]
};