apache / apache/echarts

Add support for StreamGraph algorithm

Open
#14,643 5 comments 0 reactions 0 assignees View on GitHub
en new-feature
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### 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 asymmetrical chart, that often provides a 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.