'Is it possible to use gradient + background color for areaColor along with visualMap
thanks for your time! I am using a similar example to visualize my data. I want to improve the visualization of the map and make a gradient. More or less like this. After reading the documentation, I realized that apparently this is not possible:
inRange: {
color: [
new echarts.graphic.RadialGradient(0.5, 0.5, .5, [
{
offset: 0,
color: 'green'
},
{
offset: 0,
color: 'rgb(35, 184, 116, 0.2)'
}]),
'rgba(255, 88, 74, 0.7)'
]
}
I tried to play around with overlaying two equivalent series and different settings for them, but unfortunately it doesn't work.
Solution 1:[1]
I solved the problem. By adding a gradient like this.
const mapOptions = {
series: [
...,
{..., itemStyled: {..., areaColor: gradient}},
]
}
And I already created the information panel manually and added functionality through
mapInstance.setOptions(newSeriesOption)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | aheadweb |