Merge pull request #7839 from ulleo/dev-v2

feat(指标卡): 指标增加限制: 只能拖一个指标
This commit is contained in:
ulleo 2024-01-25 18:14:07 +08:00 committed by GitHub
commit ebca9aa36a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -470,6 +470,12 @@ const addAxis = (e, axis: AxisType) => {
emitter.emit('removeAxis', { axisType: 'yAxis', axis, editType: 'remove' })
}
}
if (view.value.type === 'indicator') {
if (view.value?.yAxis?.length > 1) {
const axis = view.value.yAxis.splice(1)
emitter.emit('removeAxis', { axisType: 'yAxis', axis, editType: 'remove' })
}
}
}
const addXaxis = e => {