refactor: 地图上所有数据为0时 显示灰白色

This commit is contained in:
fit2cloud-chenyw 2021-08-31 12:48:10 +08:00
parent 816178a4a4
commit 2c267172c5

View File

@ -47,6 +47,9 @@ export function baseMapOption(chart_option, chart) {
chart_option.visualMap.min = 0 chart_option.visualMap.min = 0
chart_option.visualMap.max = 0 chart_option.visualMap.max = 0
} }
if (chart_option.visualMap.min === 0 && chart_option.visualMap.max === 0) {
chart_option.visualMap.max = 100
}
// color // color
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