Merge pull request #731 from dataease/pr@refactor_empty_map_color

refactor: 地图上所有数据为0时 显示灰白色
This commit is contained in:
fit2cloud-chenyw 2021-08-31 12:49:53 +08:00 committed by GitHub
commit c89de8719d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,9 @@ export function baseMapOption(chart_option, chart) {
chart_option.visualMap.min = 0
chart_option.visualMap.max = 0
}
if (chart_option.visualMap.min === 0 && chart_option.visualMap.max === 0) {
chart_option.visualMap.max = 100
}
// color
if (customAttr.color && customAttr.color.colors) {
chart_option.visualMap.inRange.color = customAttr.color.colors