fix(图表): 修复修改地图图例划分为自定义,导致部分地图内容无法正常显示的问题

This commit is contained in:
jianneng-fit2cloud
2025-03-07 16:19:20 +08:00
committed by jianneng-fit2cloud
parent 3b85c4bd69
commit 81c613cafc

View File

@@ -421,7 +421,7 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
const isLessThanMin = range[0] < ranges[0][0] && range[1] < ranges[0][0]
let rangeColor = colors[colorIndex]
if (isLessThanMin) {
rangeColor = hexColorToRGBA(basicStyle.areaBaseColor, basicStyle.alpha)
rangeColor = basicStyle.areaBaseColor
}
items.push({
value: tmpRange,
@@ -436,7 +436,7 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
}
options.color['value'] = ({ value }) => {
const item = items.find(item => value >= item.value[0] && value <= item.value[1])
return item ? item.color : hexColorToRGBA(basicStyle.areaBaseColor, basicStyle.alpha)
return item ? item.color : basicStyle.areaBaseColor
}
options.color.scale.domain = [ranges[0][0], ranges[ranges.length - 1][1]]
} else {