样式优化

This commit is contained in:
BianLzhaoMin 2025-07-24 09:50:41 +08:00
parent 94065f36b2
commit 32be5d9412
1 changed files with 6 additions and 3 deletions

View File

@ -166,15 +166,14 @@ function initLineChart() {
trigger: "axis", trigger: "axis",
}, },
legend: { legend: {
show: true,
data: ["计划进度", "实际进度"], data: ["计划进度", "实际进度"],
textStyle: { textStyle: {
// 图例文字样式 // 图例文字样式
color: "#fff", // 图例文字颜色 color: "#fff", // 图例文字颜色
}, },
itemStyle: { itemStyle: {
color: function (name) { color: "auto",
return name === "计划进度" ? "#5470C6" : "#FF0000";
},
}, },
}, },
grid: { grid: {
@ -203,7 +202,9 @@ function initLineChart() {
}, },
itemStyle: { itemStyle: {
color: "#5470C6", color: "#5470C6",
borderWidth: 0, // 去除白色边框
}, },
symbolSize: 8, // 可以调整小圆点的大小
}, },
{ {
name: "实际进度", name: "实际进度",
@ -216,7 +217,9 @@ function initLineChart() {
}, },
itemStyle: { itemStyle: {
color: "#FF0000", color: "#FF0000",
borderWidth: 0, // 去除白色边框
}, },
symbolSize: 10, // 可以调整小圆点的大小
}, },
], ],
}; };