style(图表-地图): 调整渐变色清新、火红、灵动颜色渐变方向为浅至深

This commit is contained in:
jianneng-fit2cloud 2024-09-04 18:52:57 +08:00
parent 0bdc049393
commit 600d18ac31

View File

@ -705,7 +705,10 @@ export const stepsColor = (start, end, steps, gamma) => {
export const getMapColorCases = colorCases => {
const cloneColorCases = JSON.parse(JSON.stringify(colorCases))
return cloneColorCases.map(colorItem => {
const curColors = colorItem.colors
let curColors = colorItem.colors
if (['fresh', 'red', 'spiritual'].includes(colorItem.value)) {
curColors = colorItem.colors.reverse()
}
const len = curColors.length
const start = curColors[0]
const end = curColors[len - 1]