You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/01/22 03:26:00 UTC
[GitHub] [echarts] echarts-bot[bot] commented on issue #16406: [Feature] visualMap 中的pieces不支持渐变色
echarts-bot[bot] commented on issue #16406:
URL: https://github.com/apache/echarts/issues/16406#issuecomment-1019031275
@ForeseeBear It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Feature] Pieces in visualMap do not support gradients
**BODY**
### What problem does this feature solve?
In many scenarios, the color in visualMap needs to be gradient. For example, if the warning meets the conditions, it is highlighted. Although the data in the series is assembled into an array object to set the gradient color, it is very inconvenient to display in this way.
### What does the proposed API look like?
visualMap: [
{
type: 'piecewise ',
pieces: [
{
value: 123,
label: '123 (custom special color)',
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0, color: 'red' // color at 0%
}, {
offset: 1, color: 'blue' // color at 100%
}],
global: false // default is false
}
},
{
outOfRange: {
color: {
type: 'radial',
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [{
offset: 0, color: 'red' // color at 0%
}, {
offset: 1, color: 'blue' // color at 100%
}],
global: false // default is false
}
}
}
]
}
]
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org