Merge pull request #6791 from ulleo/dev

feat: 针对antv散点图横轴内有纬度的情况,切换图表类型清空横轴
This commit is contained in:
ulleo 2023-11-22 14:26:38 +08:00 committed by GitHub
commit fea6462197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2175,6 +2175,12 @@ export default {
x.sort = 'none'
})
}
if ((newVal.type !== 'scatter' || newVal.type === 'scatter' && newVal.render === 'echarts') && (oldVal.type === 'scatter' && oldVal.render === 'antv')) {
//
if (this.view.xaxis && this.view.xaxis.length > 0 && this.view.xaxis[0] && this.view.xaxis[0].groupType === 'q') {
this.view.xaxis = []
}
}
if (newVal.type !== oldVal.type || newVal.render !== oldVal.render) {
this.setChartDefaultOptions()
this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render)