稳定提交
This commit is contained in:
parent
873563de73
commit
0b783c70c3
|
@ -151,7 +151,6 @@ const generateOptions = computed(() => {
|
|||
fontSize: 12,
|
||||
color: s.type === 'line' ? s.color : '#fff'
|
||||
} : undefined,
|
||||
tooltip: s.tooltip, // 添加 tooltip 配置
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
}
|
||||
|
@ -167,10 +166,11 @@ const generateOptions = computed(() => {
|
|||
type: 'cross'
|
||||
},
|
||||
formatter: (params) => {
|
||||
// 过滤掉不显示 tooltip 的系列
|
||||
const validParams = params.filter(param =>
|
||||
param.seriesModel.option.tooltip?.show !== false
|
||||
)
|
||||
// 找到原始配置中对应的系列配置
|
||||
const validParams = params.filter(param => {
|
||||
const seriesConfig = config.series.find(s => s.name === param.seriesName)
|
||||
return seriesConfig && seriesConfig.tooltip?.show !== false
|
||||
})
|
||||
|
||||
if (validParams.length === 0) return ''
|
||||
|
||||
|
|
|
@ -306,7 +306,10 @@ const salesConfig = {
|
|||
color: '#67C23A',
|
||||
showLabel: true,
|
||||
labelFormatter: '{c}台',
|
||||
show: false,
|
||||
show: true,
|
||||
tooltip: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '环比增长',
|
||||
|
@ -317,7 +320,7 @@ const salesConfig = {
|
|||
showLabel: true,
|
||||
labelFormatter: '{c}%',
|
||||
tooltip: {
|
||||
show: false
|
||||
show: true
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue