地图数据颜色

This commit is contained in:
2024-04-15 01:14:33 +08:00
parent bc50d76366
commit e72f7c5e9f
2 changed files with 61 additions and 61 deletions

View File

@@ -19,18 +19,26 @@ export default {
type: "piecewise",
splitNumber: 8,
min: 0,
max: 800,
max: 8000,
maxOpen: true,
inRange: {
color: ["#0CDEE9", "#0BD0DA", "#0BC1D5", "#0BACC1", "#0993AE", "#076C88", "#064E6B", "#054261"].reverse()
},
outOfRange: {
color: "#25EDF4"
color: [
"#25EDF4",
"rgba(12,222,233,0.9)",
"rgba(11,208,218,0.81)",
"rgba(11,193,213,0.72)",
"rgba(11,172,193,0.63)",
"rgba(9,147,174,0.54)",
"rgba(7,108,136,0.45)",
"rgba(6,78,107,0.36)",
"rgba(5,66,97,0.27)"].reverse()
},
outOfRange: {color: "#25EDF4"},
textStyle: {
color: "#fff"
},
calculable: true
}
},
},
dialog: false,
detail: [],
@@ -54,7 +62,11 @@ export default {
getData(type = "530300000000") {
return this.compData.getData({type}).then(res => {
const json = JSON.parse(res.param)
this.geoData = json.map
if (type == "530300000000") {
this.geoData = json.map
this.$refs.map.chart?.setOption({series: {data: this.mapData}})
console.log(this.$refs.map.chart?.getOption()?.series)
}
this.config.summaryConfigs = json.sta?.map((e, i) => ({pos: ["rt", "lb", 'lt', 'rb'][i % 4], display: "summary20", ...e})) || []
})
},