Merge pull request #617 from dataease/pr@dev@feat_map

feat: 地图颜色
This commit is contained in:
XiaJunjie2020 2021-08-13 13:37:09 +08:00 committed by GitHub
commit 76bdbd7170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ export function baseMapOption(chart_option, chart) {
}
// visualMap
const valueArr = chart.data.series[0].data
if (valueArr && valueArr.length > 0) {
const values = []
valueArr.forEach(function(ele) {
values.push(ele.value)
@ -42,7 +43,11 @@ export function baseMapOption(chart_option, chart) {
if (chart_option.visualMap.min === chart_option.visualMap.max) {
chart_option.visualMap.min = 0
}
} else {
chart_option.visualMap.min = 0
chart_option.visualMap.max = 0
}
// color
if (customAttr.color && customAttr.color.colors) {
chart_option.visualMap.inRange.color = customAttr.color.colors
chart_option.visualMap.inRange.colorAlpha = customAttr.color.alpha / 100