apache / apache/echarts

[Feature] Ability to exponentially scale the size of a node in Sankey charts

Open
#20,698 3 comments 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
15h 17m
Merged PRs (30d)
5

Description

### What problem does this feature solve?

Imagine a Sankey chart like this where the value of a node is disproportionally bigger than other nodes.

![Image](https://github.com/user-attachments/assets/2568763c-efc3-4d95-8bfc-55a97248c7fe)

The chart looks accurate but it is not useful to see the relative differences between nodes. A more useful way to show this data would be to scale the data exponentially and render it like that:

![Image](https://github.com/user-attachments/assets/dbfdf2d0-bf4f-4dc1-8d8c-d4e5e295b93d)

### What does the proposed API look like?

The Sankey series should support `exponent: number` option and its default value should be 1. It should exponentiate all values with this number before calculating the layout.

Contributor guide

Open the contributing guide

Research direction

Locate the Sankey series option definition and the layout calculation entry point. Verify how node values are transformed before layout, then confirm that an exponent option defaults to 1, changes the rendered proportions when set, and preserves current behavior at 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.