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 2019/12/20 07:20:57 UTC
[GitHub] [incubator-echarts] natee opened a new issue #11885: Waterfall
chart cannot process negative value as expected
natee opened a new issue #11885: Waterfall chart cannot process negative value as expected
URL: https://github.com/apache/incubator-echarts/issues/11885
### Version
4.5.0
### Reproduction link
[http://jsrun.pro/dtWKp/edit](http://jsrun.pro/dtWKp/edit)
### Steps to reproduce
originData = [-200,-120,-100,228,150,135,178,286,-119,-361,-203]
### What is expected?
It should handle negative value as excepted,
eg: falling from 400 to -400, the bar should cross zero axis, total height is 800

### What is actually happening?
When the value is falling from positive value to negative value, the bar is still above zero axis.
---
Relate issue #5308
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] ataft commented on issue #11885: Waterfall chart cannot process negative value as expected
Posted by GitBox <gi...@apache.org>.
ataft commented on issue #11885:
URL: https://github.com/apache/echarts/issues/11885#issuecomment-917171240
Any updates on this TBD milestone? I just started implementing a waterfall chart and ran into this issue.
--
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] [incubator-echarts] sjcobb commented on issue #11885: Waterfall
chart cannot process negative value as expected
Posted by GitBox <gi...@apache.org>.
sjcobb commented on issue #11885: Waterfall chart cannot process negative value as expected
URL: https://github.com/apache/incubator-echarts/issues/11885#issuecomment-570258840
@100pah adding a bar start and bar end feature would be very useful in both a waterfall and floating bar chart I've implemented that needs to account for bars that start as negative but end as positive.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] sjcobb commented on issue #11885: Waterfall chart cannot process negative value as expected
Posted by GitBox <gi...@apache.org>.
sjcobb commented on issue #11885:
URL: https://github.com/apache/echarts/issues/11885#issuecomment-917510076
Yeah no problem, [here is the src](https://github.com/sjcobb/echarts-waterfall/blob/master/waterfall.js) for the custom series type example and a[ live version link](https://sjcobb.github.io/echarts-waterfall/).
I used [dataset ](https://echarts.apache.org/en/option.html#dataset.source)to encode barStartValue and barEndValue, but that could be adjusted to not use dataset--the important part is how rectItem is constructed in [renderItem](https://echarts.apache.org/en/option.html#series-custom.renderItem). You'll also need to adjust tooltip and axis label [formatters](https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter).
--
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] ataft commented on issue #11885: Waterfall chart cannot process negative value as expected
Posted by GitBox <gi...@apache.org>.
ataft commented on issue #11885:
URL: https://github.com/apache/echarts/issues/11885#issuecomment-917251654
That'd be great. I've created a waterfall with connecting lines and a total bar, but it still doesn't work if the yAxis goes below zero. Here's an example of what I created: https://codepen.io/ataft/pen/PojmzBL
--
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] [incubator-echarts] 100pah commented on issue #11885: Waterfall
chart cannot process negative value as expected
Posted by GitBox <gi...@apache.org>.
100pah commented on issue #11885: Waterfall chart cannot process negative value as expected
URL: https://github.com/apache/incubator-echarts/issues/11885#issuecomment-568782745
`stacked bar` does not support that mix positive and negative value.
Perhaps we can only use [custom series](https://echarts.apache.org/en/option.html#series-custom) to render this kind of diagram.
But should we support that specify the start points for each bar for this kind of scenario?
For example,
```js
option = {
xAxis: {},
yAxis: {},
series: [{
bar: 'bar',
encode: {
x: 0,
// When there are more than one dimensions specified on y,
// the first dimension indicates the bar start, and the second
// indicates bar end.
y: [1, 2]
},
data: [
// bar start, bar end
['11-01', 55, 90],
['11-02', 65, 120],
['11-03', 75, 60],
['11-04', 85, 50]
]
}]
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] sjcobb commented on issue #11885: Waterfall chart cannot process negative value as expected
Posted by GitBox <gi...@apache.org>.
sjcobb commented on issue #11885:
URL: https://github.com/apache/echarts/issues/11885#issuecomment-917177720
Not an ideal solution, but I gave up on using 'bar' series type for this and implemented it as a 'custom' chart type similar to [this example](https://echarts.apache.org/examples/en/editor.html?c=custom-profit) (see [renderItem docs](https://echarts.apache.org/en/option.html#series-custom.renderItem)). This means other features have to be re-implemented, but depending on your needs it might suffice. I can clean up the code and share it if you're interested.
--
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