添加告警板块

This commit is contained in:
lai
2024-01-30 18:05:53 +08:00
parent 335afc5f76
commit ef30d2b742
8 changed files with 260 additions and 319 deletions

View File

@@ -62,20 +62,15 @@ function fnDesign(container: HTMLElement | undefined, option: EChartsOption) {
if (!container) {
return;
}
const { clientHeight, clientWidth } = container;
if (!upfFlowChart.value) {
upfFlowChart.value = markRaw(
echarts.init(container, 'light', {
width: clientWidth,
height: clientHeight - 36,
})
);
upfFlowChart.value = markRaw(echarts.init(container, 'light'));
}
option && upfFlowChart.value.setOption(option);
window.onresize = function () {
// echarts 窗口缩放自适应 随着div--echarts-records的大小来适应
upfFlowChart.value.resize();
};
option && upfFlowChart.value.setOption(option);
}
//渲染速率图
@@ -126,27 +121,25 @@ function initPicture() {
color: color[x] + ')',
smooth: true,
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: color[x] + ', 0.5)',
},
{
offset: 0.8,
color: color[x] + ', 0.5)',
},
],
false
),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10,
},
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: color[x] + ', 0.5)',
},
{
offset: 0.8,
color: color[x] + ', 0.5)',
},
],
false
),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10,
},
symbol: 'circle',
symbolSize: 5,
@@ -201,7 +194,7 @@ function initPicture() {
formatter: function (params: any) {
return params.split(' ')[0] + '\n' + params.split(' ')[1];
},
fontSize:12
fontSize: 14,
},
axisLine: {
lineStyle: {
@@ -213,9 +206,9 @@ function initPicture() {
{
name: charts.unit,
type: 'value',
// splitNumber: 4,
min:0,
max:300,
// splitNumber: 4,
min: 0,
max: 300,
axisLabel: {
formatter: '{value}',
},
@@ -230,11 +223,9 @@ function initPicture() {
},
},
},
],
series: lineY,
};
console.log(optionData)
fnDesign(upfFlow.value, optionData);
});
}