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] Unexpected behavior when using stacked lines in chart with x-axis of type 'value' #19400

Open
vincesp opened this issue Dec 13, 2023 · 6 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@vincesp
Copy link

vincesp commented Dec 13, 2023

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=MYewdgzgLgBAJgQygmBeGYCmB3GAxAGxCQGYAmAQQCcqEBPACgG0AoGGARgBoYSeyAdAA4eABgF8YZfgICsM6THHzeMgOwyAbCvEcWAXQCUAbhahIsOAEsAtpkhXwENDCYByAB5uebgG7eYNwIAtwBXN31TFhAAByhHMBcAbzYYKBAQAniYgC4YFPZ2KCorAHNSzCo8tysoTBtvVPYEDysIAAUQKzA6qvymwqg6GMxq4CoQCAhGwsKEMFskBLyAMwQCCEwBgF9U7a5UjwpWiDyCweHRwN910MwZwohgdaviu72D9jpjtrOBoZG1RuBDubg-qU2JUwp1cA3OswBVyC3Xun1mMHsoDgVySMA81S8PDo1WCMH2A3YiGQaNm1jsDicNMKBBRAGUhgQcRTCrEEMBasTONzyeiYNA-QBrMbgFZWbFgYCYAC0ACN5nAHrMIHQbCrMtUwOB7jsmfCLoDAiysJrCpiQNizniCQFBWE3GSmZSkAhPfBbPYIAkIL6rZh2XROX9Rexefyhnk9KKRejxcApYFzLL5YrVerGtyEFRMAhw5H-tGYKAiH03ABiYANsFJk1w7mIkkom3sO0O_JOwKEmCu_we7lUn1j_0MyA7VL6FjbYxAA

Steps to Reproduce

  • Create a line chart with stacked lines
  • Set both axes to type: 'value'
  • Fill the area between two lines of the stack

Current Behavior

The stacked line gets stacked on the values of the x-axis.
Screenshot 2023-12-13 183747

Expected Behavior

The stacked line gets stacked on the values of the y-axis, the same behavior as if the x-axis was of type 'category'.
Screenshot 2023-12-13 183816

Environment

- OS: Windows 10 Enterprise
- Browser: Chrome 120.0.6099.71
- Framework: None

Any additional comments?

Or are there other options for filling arbitrary areas between two lines, or between one line and one particular axis?

@vincesp vincesp added the bug label Dec 13, 2023
@echarts-bot echarts-bot bot added the missing-title This issue is missing a descriptive title. label Dec 13, 2023
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023

This comment has been minimized.

@vincesp vincesp changed the title [Bug] [Bug] Unexpected behavior when using stacked lines in chart with x-axis of type 'value' Dec 13, 2023
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Dec 13, 2023
@echarts-bot echarts-bot bot reopened this Dec 13, 2023
@echarts-bot echarts-bot bot removed the missing-title This issue is missing a descriptive title. label Dec 13, 2023
@helgasoft
Copy link

xAxis: { type: 'category', for first, and yAxis: { type: 'category' for second example
📌 please close issue if problem solved.

@vincesp
Copy link
Author

vincesp commented Dec 14, 2023

xAxis: { type: 'category', for first, and yAxis: { type: 'category' for second example 📌 please close issue if problem solved.

All my dimensions contain float values, so I need to use type: 'value' for both axes. How can I get the stacking right in that case? This is the typical use case of drawing a confidence band.

@helgasoft
Copy link

maybe #18437 can help

@vincesp
Copy link
Author

vincesp commented Dec 18, 2023

I was now able to achieve what I wanted by creating a custom renderer.

Yet, I ask myself:

  • Why can echarts not support such a behavior out of the box?
  • What is the underlying requirement description that led to the implementation which results in the behavior depicted under "Current Behavior" above? Which use case does that solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants