You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Steve245270533 (via GitHub)" <gi...@apache.org> on 2023/05/04 07:41:26 UTC
[GitHub] [echarts] Steve245270533 opened a new issue, #18589: [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上
Steve245270533 opened a new issue, #18589:
URL: https://github.com/apache/echarts/issues/18589
### Version
5.4.2
### Link to Minimal Reproduction
https://stackblitz.com/edit/web-platform-chdvcg?file=index.html
### Steps to Reproduce
```javascript
const dom = document.getElementById('container');
const myChart = echarts.init(dom);
const OPTION_CONFIG = {
axis: {
nameTextStyle: {
color: '#A2B2C2',
fontSize: 12,
lineHeight: 12,
},
axisLine: {
lineStyle: {
color: '#748BA4',
fontSize: 12,
},
},
nameGap: 40,
},
};
const data = [
['2023-06-05', 86],
['2023-06-06', 86],
['2023-06-07', 84],
['2023-06-08', 85],
['2023-06-09', 85],
['2023-06-16', 85],
['2023-06-26', 85],
['2023-07-06', 40],
['2023-08-06', 39],
];
myChart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
},
},
grid: {
left: 60,
right: 125,
},
xAxis: {
type: 'category',
name: '时间',
nameTextStyle: OPTION_CONFIG.axis.nameTextStyle,
axisLine: OPTION_CONFIG.axis.axisLine,
data: data.map(function (item) {
return item[0];
}),
},
yAxis: {
type: 'value',
name: '取值',
nameTextStyle: OPTION_CONFIG.axis.nameTextStyle,
axisLine: OPTION_CONFIG.axis.axisLine,
},
dataZoom: [
{
startValue: '2014-06-01',
},
{
type: 'inside',
},
],
visualMap: {
top: 50,
right: 10,
pieces: [
{
lt: 40,
color: '#dc67ff',
},
{
gt: 85,
color: '#ff4f28',
},
],
outOfRange: {
color: '#62d665',
},
},
series: {
type: 'line',
data: data.map(function (item) {
return item[1];
}),
},
});
window.addEventListener('resize', myChart.resize);
```
### Current Behavior
对`visualMap.pieces`配置中设定`> 85`的数据显示为**橙红色**,`< 40`的数据显示为**紫色**,其余为**绿色**
但从渲染结果来看,刚好为`85`的数据折线段是红色和绿色的叠加,刚好为`40`的数据折线段叠加了紫色。

### Expected Behavior
[40, 85]范围的数据应当也为绿色,不应该有其他颜色的叠加
### Environment
```markdown
- OS: Windows11
- Browser:Chrome 113.0.5672.64(正式版本)(64 位)
- Framework:
```
### Any additional comments?
_No response_
--
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.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
[GitHub] [echarts] echarts-bot[bot] commented on issue #18589: [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18589:
URL: https://github.com/apache/echarts/issues/18589#issuecomment-1534232787
@Steve245270533 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**
[Bug] The line chart visualMap sets the range color of the value range that does not correspond to the actual data
</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
Re: [I] [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上 [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #18589: [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上
URL: https://github.com/apache/echarts/issues/18589
--
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
Re: [I] [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上 [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18589:
URL: https://github.com/apache/echarts/issues/18589#issuecomment-2848808287
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
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
[GitHub] [echarts] helgasoft commented on issue #18589: [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18589:
URL: https://github.com/apache/echarts/issues/18589#issuecomment-1535073987
duplicate of #18386
--
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
Re: [I] [Bug] 折线图visualMap设置的数值范围颜色与实际数据对应不上 [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18589:
URL: https://github.com/apache/echarts/issues/18589#issuecomment-2869154449
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
--
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