Skip to content

feat(sankey): distinguish node and link colors with ARIA decals. close #15513 - #21877

Open
yucheng-du wants to merge 1 commit into
apache:masterfrom
yucheng-du:fix-15513
Open

yucheng-du wants to merge 1 commit into
apache:masterfrom
yucheng-du:fix-15513

Conversation

@yucheng-du

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Sankey charts with ARIA decals now give matching patterns to matching colors across nodes and links.

Fixed issues

Details

Before: What was the problem?

With aria.decal.show, the sankey series got one pattern for the whole series, so nodes of different colors all had the same diagonal stripes, and a link with an explicit color got no pattern.

before

After: How does it behave after the fixing?

Patterns are now picked from the ARIA decal palette by each node's resolved color. Nodes with the same solid color share a pattern. Links colored by source or target reuse that node's pattern, and links with an explicit solid color use that color's pattern. Level and node decal options still override the palette, and color: 'gradient' links keep their gradient.

after

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

test/ut/spec/series/sankey-decal.test.ts (two new tests; both fail without this change).

Merging options

  • Please squash the commits into a single one when merging.

Other information

Checked in Chrome with both the SVG and Canvas renderers: three node colors now give three patterns. TZ=UTC npm test (196 tests), npm run checktype and npm run lint pass.

Prepared with OpenAI Codex (GPT-6.2 Astra Ultra).

@echarts-bot

echarts-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant