增加折线

This commit is contained in:
zhangyue 2026-07-25 18:49:50 +08:00
parent 55ff382434
commit a42c3f5824
1 changed files with 688 additions and 633 deletions

View File

@ -288,6 +288,9 @@
const loadChartData = async (deployId, summaryMode, startTime) => { const loadChartData = async (deployId, summaryMode, startTime) => {
if (!deployId) return; if (!deployId) return;
// tag 0
chartDataList.value = [];
loading.value = true; loading.value = true;
try { try {
// //
@ -531,6 +534,51 @@
}, },
}, },
}, },
// 线
{
name: item.title || '趋势',
type: 'line',
data: item.data || [],
smooth: true,
symbol: 'circle',
symbolSize: 6,
lineStyle: {
color: '#ff6b6b',
width: 2,
},
itemStyle: {
color: '#ff6b6b',
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{ offset: 0, color: 'rgba(255, 107, 107, 0.3)' },
{ offset: 1, color: 'rgba(255, 107, 107, 0.05)' },
],
},
},
emphasis: {
focus: 'series',
},
label: {
show: true,
position: 'top',
fontSize: 10,
color: '#ff6b6b',
fontWeight: 500,
formatter: (params) => {
return params.value;
},
},
// 线 x
xAxisIndex: 0,
yAxisIndex: 0,
},
], ],
legend: { legend: {
show: true, show: true,
@ -544,6 +592,13 @@
name: item.title || '数据', name: item.title || '数据',
icon: 'roundRect', icon: 'roundRect',
}, },
{
name: item.title || '趋势',
icon: 'line',
itemStyle: {
color: '#ff6b6b',
},
},
...(item.markLines || []).map((line) => ({ ...(item.markLines || []).map((line) => ({
name: line.name, name: line.name,
icon: 'line', icon: 'line',