Git Product home page Git Product logo

Comments (8)

echarts-bot avatar echarts-bot commented on August 15, 2024

@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

from echarts.

Ovilia avatar Ovilia commented on August 15, 2024

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.

from echarts.

never51463 avatar never51463 commented on August 15, 2024

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

from echarts.

never51463 avatar never51463 commented on August 15, 2024

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

from echarts.

Ovilia avatar Ovilia commented on August 15, 2024

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

from echarts.

never51463 avatar never51463 commented on August 15, 2024

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.

from echarts.

Ovilia avatar Ovilia commented on August 15, 2024

#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.

from echarts.

never51463 avatar never51463 commented on August 15, 2024

ok, i know that

from echarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.