forked from github/dataease
feat: 地图样式
This commit is contained in:
parent
866744ae75
commit
f96e8a2a88
@ -45,6 +45,7 @@ export function baseMapOption(chart_option, chart) {
|
|||||||
|
|
||||||
if (customAttr.color && customAttr.color.colors) {
|
if (customAttr.color && customAttr.color.colors) {
|
||||||
chart_option.visualMap.inRange.color = customAttr.color.colors
|
chart_option.visualMap.inRange.color = customAttr.color.colors
|
||||||
|
chart_option.visualMap.inRange.colorAlpha = customAttr.color.alpha / 100
|
||||||
}
|
}
|
||||||
for (let i = 0; i < valueArr.length; i++) {
|
for (let i = 0; i < valueArr.length; i++) {
|
||||||
// const y = {
|
// const y = {
|
||||||
|
@ -821,6 +821,9 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
view.tableId = this.view.tableId
|
view.tableId = this.view.tableId
|
||||||
|
if (view.type === 'map' && view.xaxis.length > 1) {
|
||||||
|
view.xaxis = [view.xaxis[0]]
|
||||||
|
}
|
||||||
view.xaxis.forEach(function(ele) {
|
view.xaxis.forEach(function(ele) {
|
||||||
// if (!ele.summary || ele.summary === '') {
|
// if (!ele.summary || ele.summary === '') {
|
||||||
// ele.summary = 'sum'
|
// ele.summary = 'sum'
|
||||||
@ -838,6 +841,9 @@ export default {
|
|||||||
ele.filter = []
|
ele.filter = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (view.type === 'map' && view.yaxis.length > 1) {
|
||||||
|
view.yaxis = [view.yaxis[0]]
|
||||||
|
}
|
||||||
view.yaxis.forEach(function(ele) {
|
view.yaxis.forEach(function(ele) {
|
||||||
if (!ele.summary || ele.summary === '') {
|
if (!ele.summary || ele.summary === '') {
|
||||||
if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) {
|
if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) {
|
||||||
@ -1282,11 +1288,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addXaxis(e) {
|
addXaxis(e) {
|
||||||
|
if (this.view.type === 'map' && this.view.xaxis.length > 1) {
|
||||||
|
this.view.xaxis = [this.view.xaxis[0]]
|
||||||
|
}
|
||||||
this.dragCheckType(this.view.xaxis, 'd')
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
this.dragMoveDuplicate(this.view.xaxis, e)
|
this.dragMoveDuplicate(this.view.xaxis, e)
|
||||||
this.save(true)
|
this.save(true)
|
||||||
},
|
},
|
||||||
addYaxis(e) {
|
addYaxis(e) {
|
||||||
|
if (this.view.type === 'map' && this.view.yaxis.length > 1) {
|
||||||
|
this.view.yaxis = [this.view.yaxis[0]]
|
||||||
|
}
|
||||||
this.dragCheckType(this.view.yaxis, 'q')
|
this.dragCheckType(this.view.yaxis, 'q')
|
||||||
this.dragMoveDuplicate(this.view.yaxis, e)
|
this.dragMoveDuplicate(this.view.yaxis, e)
|
||||||
this.save(true)
|
this.save(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user