fix: 监测曲线功能优化。

This commit is contained in:
tianyongbao
2026-01-11 16:22:55 +08:00
parent e0a52e4430
commit 1fdbc95b49
2 changed files with 15 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ declare module 'vue' {
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
@@ -50,6 +51,7 @@ declare module 'vue' {
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
FlowChart: typeof import('./../components/Process/flowChart.vue')['default']
FlowChartImg: typeof import('./../components/Process/flowChartImg.vue')['default']

View File

@@ -455,6 +455,8 @@ const updateChart = () => {
type: chartType.value,
data: yData,
smooth: chartType.value === 'line',
symbol: 'circle', // 使用圆形标记
symbolSize: chartType.value === 'line' ? 0 : 6, // 折线图默认不显示点,柱状图不受影响
itemStyle: {
color: config.color
},
@@ -463,6 +465,17 @@ const updateChart = () => {
} : undefined,
areaStyle: chartType.value === 'line' ? {
opacity: 0.1
} : undefined,
emphasis: chartType.value === 'line' ? {
symbol: 'circle',
symbolSize: 12,
itemStyle: {
color: config.color,
borderColor: '#fff',
borderWidth: 3,
shadowBlur: 8,
shadowColor: config.color
}
} : undefined
}
]