You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/11/23 11:42:23 UTC
[GitHub] [echarts] HenrikDK opened a new issue, #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
HenrikDK opened a new issue, #17960:
URL: https://github.com/apache/echarts/issues/17960
### Version
5.4.0
### Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=line-marker&code=PYBwLglsB2AEC8sDeBYAULWAPAgliAzgFzLqaYAmAhmFSQNoDkOjANLIwEJscDCPjACICAoowC6ZWAF9WUgJ55CJJLCmYw8kAFMSjADbAA5mymypBbQCcI24rHrrSGcpRp0HARnYAmAMzsACyBQQGwAAzici6uALZUWCSBAU6Y0FSxuhyWNnaepjHkmjp6AEZUVgWumAS0AMYA1npYjE7mhaiFbrQM4ex9EeyeA5HR1bDpmXo5tgQ-VdXFWYzllWPVtVSNza2F7a6d49Q9DgCsQb5h57CeUakTGcszdn4LrktlFW_km9scLW11pI0NIANxAA
### Steps to Reproduce
When using the type parameter 'log' to produce a logarithmic stacked chart the rendering completely breaks when ever the first series encounters 0 values, even though other series might have a non 0 value. it seems like scaling and positoning calculations are wrong :)
Example 1 (broken):
https://echarts.apache.org/examples/en/editor.html?c=line-marker&code=PYBwLglsB2AEC8sDeBYAULWAPAgliAzgFzLqaYAmAhmFSQNoDkOjANLIwEJscDCPjACICAoowC6ZWAF9WUgJ55CJJLCmYw8kAFMSjADbAA5mymypBbQCcI24rHrrSGcpRp0HARnYAmAMzsACyBQQGwAAzici6uALZUWCSBAU6Y0FSxuhyWNnaepjHkmjp6AEZUVgWumAS0AMYA1npYjE7mhaiFbrQM4ex9EeyeA5HR1bDpmXo5tgQ-VdXFWYzllWPVtVSNza2F7a6d49Q9DgCsQb5h57CeUakTGcszdn4LrktlFW_km9scLW11pI0NIANxAA
In this example i have modified an existing demo of a log stacked chart and changed the last value of "series1" to 0 immediately the rendering of the chart breaks and max value is set as 10 and most of the data dissapears from the chart.
```option = {
xAxis: {
data: ['A', 'B', 'C', 'D', 'E']
},
yAxis: {
type: 'log',
},
series: [
{
data: [1, 23, 44, 43, 0],
max: 43,
name: 'series1',
type: 'bar',
stack: 'x'
},
{
data: [0, 0, 0, 10, 0],
name: 'series2',
type: 'bar',
stack: 'x'
},
{
data: [5, 4, 23, 5, 1],
name: 'series3',
type: 'bar',
stack: 'x'
},
]
};
```
Example1 (rendered correctly):
If you then modify series1 again and set the last value to 1 it renders correctly.
https://echarts.apache.org/examples/en/editor.html?c=line-marker&code=PYBwLglsB2AEC8sDeBYAULWAPAgliAzgFzLqaYAmAhmFSQNoDkOjANLIwEJscDCPjACICAoowC6ZWAF9WUgJ55CJJLCmYw8kAFMSjADbAA5mymypBbQCcI24rHrrSGcpRp0HARnYAmAMzsACyBQQGwnuJyLq4AtlRYJIEBTpjQVDG6HJY2dp6m0eSaOnoARlRW-a6YBLQAxgDWeliMTuYFqAVutAwADOx9sAOeAz2RKbBpGXrZtgQ-lVVFmYxlFVFVsDVUDU0tBW2uHRvU3Q4ArEG-YRfhY50T6cszdn4Lrkul5W_kWzscza11rBJGhpABuIA
```
option = {
xAxis: {
data: ['A', 'B', 'C', 'D', 'E']
},
yAxis: {
type: 'log',
},
series: [
{
data: [1, 23, 44, 43, 1],
max: 43,
name: 'series1',
type: 'bar',
stack: 'x'
},
{
data: [0, 0, 0, 10, 0],
name: 'series2',
type: 'bar',
stack: 'x'
},
{
data: [5, 4, 23, 5, 1],
name: 'series3',
type: 'bar',
stack: 'x'
},
]
};
```
Example 2 (switched series order, broken)
https://echarts.apache.org/examples/en/editor.html?c=line-marker&code=PYBwLglsB2AEC8sDeBYAULWAPAgliAzgFzLqaYAmAhmFSQNoDkOjANLIwEJscDCPjACICAoowC6ZWAF9WUgJ55CJJLCmYw8kAFMSjADbAA5mymypBbQCcI24rHrrSGcpRp0HABnbfYvgIy-nuJyLq7QVAC2uhyWNnYATKZh5Jo6egBGVFbJrpgEtADGANZ6WIxO5imoKW60DP7sCQDM7AAsbe2tfiFOmJFUWCRtrX2wEdF6cbYE_rl5aTGMWTmhebAFVCVlFSlVTjXr1PUOAKztTd3nsP69teNRS9N2zfOui5nZb-Sb2xzllTWsEkaGkAG4gA
If we switch the order of the series so "series2" comes before "series1"
```
option = {
xAxis: {
data: ['A', 'B', 'C', 'D', 'E']
},
yAxis: {
type: 'log',
},
series: [
{
data: [0, 0, 0, 10, 0],
name: 'series2',
type: 'bar',
stack: 'x'
},
{
data: [1, 23, 44, 43, 0],
max: 43,
name: 'series1',
type: 'bar',
stack: 'x'
},
{
data: [5, 4, 23, 5, 1],
name: 'series3',
type: 'bar',
stack: 'x'
},
]
};
```
The result is completely garbled with multiple series going missing.
In short it seems the rendering engine has a hard time handling type: 'log' on the y axis for stacked bar charts.
### Current Behavior
Rendering breaks on stacked bar charts when using logarithmic yAxis "type" and series contain 0 values especially in the first series.
It seems the scaling information for the chart is calculated incorrectly when the first series contains 0 even if other series contain positive values.
Judging from this issue, it's been known for a while and is affecting multiple other users:
https://github.com/apache/echarts/issues/9801
### Expected Behavior
Echarts should correctly rescale the bars according to the yAxis, and handle the existence of 0 values in any series without it affecting the rendering of the chart.
### Environment
```markdown
- OS: windows 10
- Browser: Chrome
- Framework: Vue3
```
### Any additional comments?
This is a simplified example from our production environment, where we're using echarts to represent errors over time, meaning most of our series have 0 values in them.
Example 3 (More complicated production data)
https://echarts.apache.org/examples/en/editor.html?c=bar-background&code=GYVwdgxgLglg9mABHAbgUwE4pmg7gYQAsBDDKAMTgwFtiopMAKAB1OOoGcBKRAbwFgAUIhHIQUZuMQBeRAHIAPABMYKAHxzEAakSsM7DgG0ADAF0AdGHZohoxGnRgoHGbradzGNEpAQ0jRmIAGkQAIx5pNW1ibW1Q8xRiABsQNBDjLltRGGBERgc0JxcojL4suxE4cUkobVlFDlYkDigATyS0aQAiYCS4OgAuDBgAc0IoAG5aDBGYMABaDuAoAYAmY2YADwmIOD6MAYBiADZTieAEKHncNFHxgYBOY2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Mc2k1nds59nee5wXNuF_NIdhyzQNTiDnMx9DQjNYIQgYrACCuDKoiwFAHRYm3RIMJsKyIF0bwYBgVAuKgeoshKSTEC0iCrKOiCEFUGAcJOhYiH3UAAMqOmg3cbxUFxOAA6lG9yD2AVC0Ek68lrKx87zAABe--INOauH3YQZUFiXQjF4VoXRD483vqIVgSgVBMixIYbE6R4GIHevXOwoC7Doj2LATEZQwGb3dCMTAWI5DEE2DADgcg46ymIaQgACnAOYDADjYLlO3Jmb85AcBIEoOAuACT5gobyEktB6AEOQOgLAOACAkDIJQGgdAGFglQaIDo-CwBKAPmAjh3CsTAGSCafhIhFEiE2AAQRIRwdRsoprECxF2BgvYMCtAUfoxAACYBqKYbyJYA9ZzOO_pcYgcwAAyxBQhoCSFiKAGBUi-NEKEOA9A4DUCxAtQ-6IsGbhiSId0F9ZxOLBK0UxpCLG8jDoQsUqRyGH0aEkGAUBAlzDfj3OUmjcDaN0TYHBpZMnwi7F3RAkTUh5JLP8GAQj4BgAACJNjoO
MrEm4UkliRmNLEVj2wTCAA
Since some systems will have periods of time where the rate of errors are pretty high compared to other systems they can drown out other systems in the chart, therefore we would like to switch to a logaritmic view but it seems very broken.
--
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] DanielBogenrieder commented on issue #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
Posted by "DanielBogenrieder (via GitHub)" <gi...@apache.org>.
DanielBogenrieder commented on issue #17960:
URL: https://github.com/apache/echarts/issues/17960#issuecomment-1430962230
we also run into this issue. Is there any solution to it?
--
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] HenrikDK commented on issue #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
Posted by "HenrikDK (via GitHub)" <gi...@apache.org>.
HenrikDK commented on issue #17960:
URL: https://github.com/apache/echarts/issues/17960#issuecomment-1433093896
Nope :(
--
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] echarts-bot[bot] commented on issue #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17960:
URL: https://github.com/apache/echarts/issues/17960#issuecomment-1326265277
This issue is labeled with `difficulty: easy`.
@HenrikDK Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.
Please have a look at [How to debug ECharts](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 🤓
--
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] JKeita commented on issue #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
Posted by "JKeita (via GitHub)" <gi...@apache.org>.
JKeita commented on issue #17960:
URL: https://github.com/apache/echarts/issues/17960#issuecomment-1467281581
meaningless answer
--
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] Stacked Bar Chart with yAxis { type: 'log' } seems very broken [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia closed issue #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
URL: https://github.com/apache/echarts/issues/17960
--
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] professorabhay commented on issue #17960: [Bug] Stacked Bar Chart with yAxis { type: 'log' } seems very broken
Posted by GitBox <gi...@apache.org>.
professorabhay commented on issue #17960:
URL: https://github.com/apache/echarts/issues/17960#issuecomment-1327221231
I am interested to work on this issue. Its seems easy to solve this issue with little bit guidance.
--
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] Stacked Bar Chart with yAxis { type: 'log' } seems very broken [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on issue #17960:
URL: https://github.com/apache/echarts/issues/17960#issuecomment-1895275807
See conclusion at [#19234](https://github.com/apache/echarts/issues/19234#issuecomment-1776794193). Stacked bars using log axis is misleading and thus this problem is not going to be fixed.
--
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