Merge pull request #12484 from dataease/pr@dev-v2@chart-horizontal-bar-fix

fix(图表): 修复堆叠条形图移除指标字段后,保存再拖入其他指标字段无法显示数据的问题
This commit is contained in:
jianneng-fit2cloud 2024-09-26 11:00:16 +08:00 committed by GitHub
commit eb92ff2737
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -360,7 +360,7 @@ export class HorizontalStackBar extends HorizontalBar {
if (mainSort || subSort) {
return options
}
const quotaSort = yAxis?.[0].sort !== 'none'
const quotaSort = yAxis?.[0]?.sort !== 'none'
if (!quotaSort || !extStack.length || !yAxis.length) {
return options
}