Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix issue that legend category cannot update shape #4968

Merged
merged 2 commits into from
May 10, 2023

Conversation

Aarebecca
Copy link
Contributor

@Aarebecca Aarebecca commented May 9, 2023

修复 Legend 不会调整尺寸的问题 #4967

导致异常的原因是因为使用 Layout 将图例包裹了一层,Layout 组件更新属性时对 width height 做了隔离(我们通常期望连续图例长度保存固定,而不是随容器大小变化)

目前的解决方案是给离散图例单独定义了一个 Layout 容器,不会对 width height 属性做隔离,即更新 Layout 宽高时会透传到图例

@Aarebecca Aarebecca force-pushed the fix/fix-legend-width-update branch from efbae37 to fc22fa7 Compare May 9, 2023 11:12
@hustcc
Copy link
Member

hustcc commented May 9, 2023

PR 中描述问题产生的原因吧~~~

Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加一个测试

@pearmini pearmini merged commit 01e071e into v5 May 10, 2023
3 checks passed
@pearmini pearmini deleted the fix/fix-legend-width-update branch May 10, 2023 02:22
hustcc pushed a commit that referenced this pull request May 16, 2023
* fix: fix issue that legend category cannot update shape

* test: update test case
hustcc pushed a commit that referenced this pull request May 16, 2023
* fix: fix issue that legend category cannot update shape

* test: update test case
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.

None yet

3 participants