apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser

Home Page:https://echarts.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] itemStyle.color配置成回调函数时,lineStyle.color无效

never51463 opened this issue · comments

commented

Version

e.g. 5.5.0

Link to Minimal Reproduction

#10910

Steps to Reproduce

配置series-line.itemStyle.color作为回调函数时,只有拐点变色,lineStyle没有按文档所说的会根据itemStyle.color取值
企业微信截图_17186920882953
企业微信截图_17186921122638

该问题与19年被提出并且被修复过,现在在新版本重新出现该问题并且没有解决

Current Behavior

当itemStyle的color使用回调函数时,线条颜色不能产生相应变化

Expected Behavior

当itemStyle的color使用回调函数时,线条颜色也能产生相应变化

Environment

- OS:windows 10
- Browser: 
- Framework:

Any additional comments?

No response

@never51463 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

BODY

Version

e.g. 5.5.0

Link to Minimal Reproduction

#10910

Steps to Reproduce

When configuring series-line.itemStyle.color as the callback function, only the inflection point changes color, and lineStyle does not take the value according to itemStyle.color as stated in the document.
Enterprise WeChat screenshot_17186920882953
Enterprise WeChat screenshot_17186921122638

This problem was raised and fixed in 2019. Now the problem reappears in the new version and is not solved.

Current Behavior

When the color of itemStyle uses the callback function, the line color cannot change accordingly.

Expected Behavior

When the color of itemStyle uses the callback function, the line color can also change accordingly.

Environment

- OS: windows 10
-Browser:
- Framework:

Any additional comments?

No response

This does not appear to be a bug, in my opinion. When itemStyle.color is defined as a callback function, it has the capability to return different colors based on varying data indices. However, lineStyle.color does not support using different colors for different data indices. As a result, when it is specified as a callback, it defaults to the series color as a graceful fallback.

commented

This behavior does not match the document description, and the returned value belongs to a reasonable color range. It is unreasonable to assume that it is not a bug simply because it is returned using a callback function. Especially when the document explicitly states that lineStyle can inherit from itemStyle, this detail is illogical and independent of whether itemStyle uses callback function methods.
企业微信截图_17186941434179

commented

if it's no a bug, how to choose when I need to modify the color of a segment of a line based on different numerical values, but it is not a gradient scene? @Ovilia

Currently, ECharts doesn't have the ability to set line styles of different segments, if visualMap doesn't count.

commented

Perhaps adding support for callback function types to lineStyle would be more in line with the documentation's explanatory logic.
@Ovilia When there are multiple series, visualMap cannot support the simultaneous use of multiple configurations, and conflicts will be automatically merged.

#17138 Maybe you can follow this feature. This is an epic feature so it's still in pending state and I don't know if when I have time to do this.

commented

ok, i know that