option配置项如下:
const OptionData = {
legend: {
data: ["未审数据", "导入速度"],
},
tooltip: {
trigger: "axis",
},
xAxis: {
type: "time",
// 将x轴刻度最小间隔设置为5分钟
minInterval: 5 * 60 * 1000,
},
yAxis: {
type: "value",
},
series: [
{
name: "未审数据",
data: [
["2021-01-04 08:14:36", 60],
["2021-01-04 08:22:46", 56],
["2021-01-04 08:30:46", 23],
["2021-01-04 08:36:46", 40],
],
type: "line",
smooth: true,
},
{
name: "导入速度",
data: [
["2021-01-04 08:20:36", 90],
["2021-01-04 08:24:46", 26],
["2021-01-04 08:32:46", 53],
["2021-01-04 08:38:46", 10],
],
type: "line",
smooth: true,
},
],
};
唉,ehcarts还是没那么简单的