feat: 针对antv散点图横轴内有纬度的情况,切换图表类型清空横轴

This commit is contained in:
ulleo 2023-11-22 14:25:24 +08:00
parent 91dd09c574
commit 774099d65f

View File

@ -2175,6 +2175,12 @@ export default {
x.sort = 'none' 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) { if (newVal.type !== oldVal.type || newVal.render !== oldVal.render) {
this.setChartDefaultOptions() this.setChartDefaultOptions()
this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render) this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render)