feat(视图):面积堆叠图进入默认显示面积

This commit is contained in:
junjie 2021-05-28 15:45:47 +08:00
parent edfb017066
commit be7a7fb2dc

View File

@ -98,7 +98,7 @@
<el-radio-group
v-model="view.type"
style="width: 100%"
@change="save(true)"
@change="save(true,'chart')"
>
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
<el-radio value="table-normal" label="table-normal"><svg-icon icon-class="table-normal" class="chart-icon" /></el-radio>
@ -430,7 +430,7 @@ export default {
return true
})
},
save(getData) {
save(getData, trigger) {
const view = JSON.parse(JSON.stringify(this.view))
view.id = this.view.id
view.sceneId = this.view.sceneId
@ -471,6 +471,12 @@ export default {
view.yaxis.splice(1, view.yaxis.length)
}
}
if (view.type === 'line' && trigger === 'chart') {
view.customAttr.size.lineArea = false
}
if (view.type === 'line-stack' && trigger === 'chart') {
view.customAttr.size.lineArea = true
}
view.xaxis = JSON.stringify(view.xaxis)
view.yaxis = JSON.stringify(view.yaxis)
view.customAttr = JSON.stringify(view.customAttr)