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 2021/04/11 08:33:05 UTC

[GitHub] [echarts] villebro opened a new issue #14643: Add support for StreamGraph algorithm

villebro opened a new issue #14643:
URL: https://github.com/apache/echarts/issues/14643


   ### What problem does this feature solve?
   ECharts currently supports the `themeRiver` algorithm for drawing area charts centered around the x-axis:
   
   ![image](https://user-images.githubusercontent.com/33317356/114297317-933f6f00-9ab8-11eb-9fa0-4c218bf52b03.png)
   
   Another algorithm, StreamGraph, produces a similar but non-symmetrical chart, that often provides an more visually appealing chart, which minimizes the slopes of the series for each point on the x-axis. See an example of the StreamGraph in Apache Superset using the NVD3 plugin:
   
   ![image](https://user-images.githubusercontent.com/33317356/114297428-41e3af80-9ab9-11eb-8baa-19ffb2200369.png)
   
   There are two variations of this; the `wiggle` and `weighted_wiggle` algorithm (see the following technical paper for details: http://leebyron.com/streamgraph/stackedgraphs_byron_wattenberg.pdf ). E.g. matplotlib implements these https://www.python-graph-gallery.com/252-baseline-options-for-stacked-area-chart: (sym here equals `themeRiver`)
   
   ![image](https://user-images.githubusercontent.com/33317356/114297289-6ab77500-9ab8-11eb-8d9c-040b3d81574b.png)
   
   ### What does the proposed API look like?
   These algorithms could be added to the current `themeRiver` type as rendering options, or potentially introduce a new `flowGraph`/`streamGraph` type, and add `themeRiver`, `wiggle` and `weightedWiggle` as rendering options to it.
   
   If this is something the project would interested in introducing, I would be happy to carry out the work for it.
   
   <!-- 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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] villebro edited a comment on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
villebro edited a comment on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817319492


   @pissang thanks for the response! If I understand the limitation correctly, I think centering the baseline on 0 is a nice extra, but it doesn't necessarily need to be so (if you look at the NVD3 example, the baseline starts on the total value at x0, which doesn't really make sense). So I'm sure we can compromise on the y-axis values/ticks and address those later if the need comes up.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] villebro commented on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817470190


   I think adding it to area would also be a good solution for now, especially if we won't be super pedantic about the y-axis ticks. Maybe a bigger refactor/moving to a new series type can then be left for the next major version. But to reiterate, any solution is fine by me, and happy to help out with the implementation if you feel this is worthwhile pursuing.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817693445


   The easiest and acceptable way is adding a `wiggle` option to `themeRiver`. It will be great if you can implement it to meet your requirement and PR to us.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang edited a comment on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817300189


   Hi @villebro, Thanks for the very detailed explanation. Correct me if I'm wrong, from the graph, I guess the ticks of y-axis need to be calculated after the stream is layout since the 0 tick is on the baseline. If so, it's not easy for echarts because the architecture limits layout is always after tick calculation. I think we need to do some big underlying change before we integrating streamgraph.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] villebro commented on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817319492


   @pissang thanks for the response! I think centering the baseline on 0 is a nice extra, but it doesn't necessarily need to be so (if you look at the NVD3 example, the baseline starts on the total value at x0, which doesn't really make sense). So I'm sure we can compromise on the y-axis values/ticks and address those later if the need comes up.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817300189


   Hi @villebro, Thanks for the very detailed explanation. Correct me if I'm wrong, from the graph, I guess the ticks of y-axis need to be calculated after the stream is layout since the 0 tick is on the baseline. If so, it's not easy for echarts because them architecture limits layout is always after tick calculation. I think we need to do some big underlying change before we support streamgraph.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang edited a comment on issue #14643: Add support for StreamGraph algorithm

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #14643:
URL: https://github.com/apache/echarts/issues/14643#issuecomment-817300189


   Hi @villebro, Thanks for the very detailed explanation. Correct me if I'm wrong, from the graph, I guess the ticks of y-axis need to be calculated after the stream is layout since the 0 tick is on the baseline. If so, it's not easy for echarts because them architecture limits layout is always after tick calculation. I think we need to do some big underlying change before we integrating streamgraph.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org