Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] visualMap实现折线颜色渐变渲染问题 #17648

Closed
luolongsen opened this issue Sep 14, 2022 · 4 comments
Closed

[Bug] visualMap实现折线颜色渐变渲染问题 #17648

luolongsen opened this issue Sep 14, 2022 · 4 comments

Comments

@luolongsen
Copy link

luolongsen commented Sep 14, 2022

Version

5.2.2

Link to Minimal Reproduction

No response

Steps to Reproduce

折线图通过设置配置visualMap属性配置阈值颜色变化,但当有两个连续的拐点值,比如下文12值的两个点,会出现一条平行线,有两种颜色
visualMap: {
show: true,
type:'piecewise',
top: '13%',
right: '2%',
orient: 'horizontal',
pieces: [
{ gt: -4, lte: 0, color: '#7088ff' },
{ gt: 0, lte: 4, color: '#75cfff' },
{ gt: 4, lte: 8, color: '#ffc619' },
{ gt: 8, lt: 12, color: '#ff8766' },
{ gt: 12, lte: 16, color: '#483D8B' }
],
outOfRange: { color: '#999' }
},
image

Current Behavior

折线图通过设置配置visualMap属性配置阈值颜色变化,但当有两个连续的拐点值,比如下文12,会出现一条平行线,有两种颜色
visualMap: {
show: true,
type:'piecewise',
top: '13%',
right: '2%',
orient: 'horizontal',
pieces: [
{ gt: -4, lte: 0, color: '#7088ff' },
{ gt: 0, lte: 4, color: '#75cfff' },
{ gt: 4, lte: 8, color: '#ffc619' },
{ gt: 8, lt: 12, color: '#ff8766' },
{ gt: 12, lte: 16, color: '#483D8B' }
],
outOfRange: { color: '#999' }
},

Expected Behavior

预期折线图颜色显示应该和配置保持一致,小于等于拐点一种颜色,大于拐点另一种颜色

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@luolongsen luolongsen added the bug label Sep 14, 2022
@echarts-bot echarts-bot bot added the missing-title This issue is missing a descriptive title. label Sep 14, 2022
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2022
@echarts-bot

This comment has been minimized.

@luolongsen luolongsen changed the title [Bug] [Bug] visualMap实现折线颜色渐变渲染问题 Sep 14, 2022
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Sep 14, 2022
@echarts-bot echarts-bot bot reopened this Sep 14, 2022
@echarts-bot
Copy link

echarts-bot bot commented Sep 14, 2022

@luolongsen 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. 🤗

TRANSLATED

TITLE

[Bug] VisualMap implements polyline color gradient rendering issues

BODY

Version

5.2.2

Link to Minimal Reproduction

No response

Steps to Reproduce

The line chart configures the threshold color change by setting the visualMap property, but when there are two consecutive inflection point values, such as 12 below, a parallel line will appear with two colors
visualMap: {
show: true,
type:'piecewise',
top: '13%',
right: '2%',
orient: 'horizontal',
pieces: [
{ gt: -4, lte: 0, color: '#7088ff' },
{ gt: 0, lte: 4, color: '#75cfff' },
{ gt: 4, lte: 8, color: '#ffc619' },
{ gt: 8, lt: 12, color: '#ff8766' },
{ gt: 12, lte: 16, color: '#483D8B' }
],
outOfRange: { color: '#999' }
},
image

Current Behavior

The line chart configures the threshold color change by setting the visualMap property, but when there are two consecutive inflection point values, such as 12 below, a parallel line will appear with two colors
visualMap: {
show: true,
type:'piecewise',
top: '13%',
right: '2%',
orient: 'horizontal',
pieces: [
{ gt: -4, lte: 0, color: '#7088ff' },
{ gt: 0, lte: 4, color: '#75cfff' },
{ gt: 4, lte: 8, color: '#ffc619' },
{ gt: 8, lt: 12, color: '#ff8766' },
{ gt: 12, lte: 16, color: '#483D8B' }
],
outOfRange: { color: '#999' }
},

Expected Behavior

It is expected that the color display of the line chart should be consistent with the configuration, one color less than or equal to the inflection point, and another color greater than the inflection point

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@echarts-bot echarts-bot bot removed the missing-title This issue is missing a descriptive title. label Sep 14, 2022
@Ovilia
Copy link
Contributor

Ovilia commented Sep 15, 2022

Please follow #17138

@Ovilia Ovilia added duplicate and removed bug pending We are not sure about whether this is a bug/new feature. labels Sep 15, 2022
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2022
@ye-congwang
Copy link

我5.2.1的版本也有这个问题,本来点和线应该是绿色的,好像是pieces里面不能同时存在正负值,不知道咋解决
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants