Merge pull request #5255 from dataease/pr@dev@feat_mix

feat: 组合图副轴值支持同环比
This commit is contained in:
Junjun 2023-05-19 15:33:30 +08:00 committed by GitHub
commit 4df0003e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -319,10 +319,10 @@ export default {
},
isEnableCompare() {
let xAxis = null
if (Object.prototype.toString.call(this.chart.xaxisExt) === '[object Array]') {
xAxis = JSON.parse(JSON.stringify(this.chart.xaxisExt))
if (Object.prototype.toString.call(this.chart.xaxis) === '[object Array]') {
xAxis = JSON.parse(JSON.stringify(this.chart.xaxis))
} else {
xAxis = JSON.parse(this.chart.xaxisExt)
xAxis = JSON.parse(this.chart.xaxis)
}
const t1 = xAxis.filter(ele => {
return ele.deType === 1 && SUPPORT_Y_M.includes(ele.dateStyle)