[codex] Fix treemap parent select fill with upperLabel#21575
[codex] Fix treemap parent select fill with upperLabel#21575
Conversation
|
Thanks for your contribution! The pull request is marked to be To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: This message is shown because the PR description doesn't contain the document related template. |
There was a problem hiding this comment.
Pull request overview
Fixes treemap parent-node selection styling when upperLabel is enabled by ensuring the selected background fill honors select.itemStyle.color (instead of being hardwired to borderColor), and adds a regression unit test for this behavior.
Changes:
- Update treemap parent-node background select-state fill logic to prefer
select.itemStyle.color, with fallbacks. - Add a unit test asserting parent nodes with
upperLabeluseselect.itemStyle.colorfor the select state fill.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/chart/treemap/TreemapView.ts |
Adjusts select-state fill computation for parent-node background rendering when upperLabel is used. |
test/ut/spec/series/treemap.test.ts |
Adds a regression test validating the parent-node select fill uses select.itemStyle.color with upperLabel. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21575@1e2a3cf |
Ovilia
left a comment
There was a problem hiding this comment.
Can we have an HTML test for this case?
|
Added a browser-level regression case in \ on top of the existing Jest regression. The new HTML page exercises the \ parent-node case directly in the browser. |
|
Added a browser-level regression case in The new HTML page exercises the |
Summary
upperLabelusing their configuredselect.itemStyle.colorRoot Cause
The parent-node
upperLabelrendering path hardwired the selected fill color toborderColor, so parent nodes ignoredselect.itemStyle.color. That broke parent-node selected styling and led to the hover/select behavior reported in the issue.Validation
./node_modules/.bin/jest --config test/ut/jest.config.cjs --runInBand test/ut/spec/series/treemap.test.ts./node_modules/.bin/eslint src/chart/treemap/TreemapView.ts test/ut/spec/series/treemap.test.tsFixes #21433