Skip to content

fix(sunburst): preserve data decal. close #18118#21687

Open
rahul37wallst-sudo wants to merge 1 commit into
apache:masterfrom
rahul37wallst-sudo:investigate-18118-sunburst-decal-override
Open

fix(sunburst): preserve data decal. close #18118#21687
rahul37wallst-sudo wants to merge 1 commit into
apache:masterfrom
rahul37wallst-sudo:investigate-18118-sunburst-decal-override

Conversation

@rahul37wallst-sudo

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Preserve sunburst data item decal overrides when ARIA decal generation is enabled.

Fixed issues

Details

Before: What was the problem?

When aria.decal.show was enabled for a sunburst series, the tree-specific ARIA decal helper assigned palette decals directly to each tree node.

Because sunburst ignores generic data item style processing, series.data[].itemStyle.decal was not preserved before ARIA decal assignment. As a result, a data item such as:

{
    name: 'Changed decal',
    value: 1,
    itemStyle: {
        decal: {
            symbol: 'none'
        }
    }
}

still rendered with the global ARIA decal, for example symbol: 'circle'.

After: How does it behave after the fixing?

The tree ARIA decal helper now reads a node's itemStyle.decal, merges it over the palette decal, and preserves explicit decal: 'none'.

This allows sunburst data items to override or disable the ARIA decal while keeping palette decals for items without an override.

A regression test was added for the sunburst + ARIA decal case.

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/sunburst.test.ts

Merging options

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

Other information

Validation run locally:

npx jest --config test/ut/jest.config.cjs --coverage=false --runInBand --runTestsByPath test/ut/spec/series/aria-columns-exclude.test.ts test/ut/spec/series/sunburst.test.ts
npx eslint src/chart/helper/enableAriaDecalForTree.ts test/ut/spec/series/sunburst.test.ts
npm run checktype
git diff --check

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant