textStyle: {
color: "#A7C8ED",
lineHeight: 28,
},
formatter: function(params) {
var html = "";
for (var i in params) {
var param = params[i];
// echarts⽇期格式化api
var date = echarts.format.formatTime("yyyy-MM-dd", new Date(param.name));
html += `${date}<br />${param.seriesName}:<span >${param.value}</span><br />`;                    }
return html;
},
axisPointer: {
type: "none",
},
extraCssText: "width: 170px",
},
// 图表部分边距
grid: {
top: "60",
left: "35",
right: "34",
bottom: "35",
containLabel: true,
},
xAxis: {
type: "category",
data: ["2020/11/01", "2020/11/02", "2020/11/03", "2020/11/04", "2020/11/05", "2020/11/06", "2020/11/07", ],
// x轴轴线
axisLine: {
lineStyle: {
textstylecolor: "rgba(54, 112, 187, 1)",
width: 2,
},
},
// x轴刻度点边界
boundaryGap: true,
// x轴刻度隐藏
axisTick: {
show: false,
},
// x轴label显⽰
axisLabel: {
fontSize: 14,
color: "#A7C8ED",
// label内容是⽇期,需要格式化
formatter: function(value) {
return echarts.format.formatTime("MM.dd", new Date(value));
},
},
},
yAxis: {
type: "value",
// y轴轴线隐藏
axisLine: {
show: false,
},
// y轴刻度隐藏
axisTick: {
show: false,
},
// 纵向横线
splitLine: {
show: true,
lineStyle: {
color: "rgba(54, 112, 187, 1)",
},
},
// y轴label
axisLabel: {
fontSize: 14,
color: "#A7C8ED",