docs: supply documents for pager.hugContent of discrete legend#4621
Merged
Conversation
skie1997
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 This is a ...
🔗 Related issue link
Documents the
pager.hugContentoption for the discrete legend, added in VRender PR VisActor/VRender#2097. The option flows into VChart automatically throughIPager extends LegendPagerAttributes, so this PR is docs-only.💡 Background and solution
By default, when a discrete legend paginates, the pager is pinned to the far end of the legend's available space while the items stay at the start — the paged legend renders justified (items left, pager right) and its bounds always occupy the full available width. This makes it impossible for an outer layout to center "items + pager" as one block.
VRender #2097 adds an opt-in
pager.hugContent(defaultfalse, fully backward compatible): the pager is placed right after the last item and the paging clip viewport shrinks to the actual content extent, so the legend bounds hug the content and can be centered by the outer layout.This PR documents that option in the discrete legend option docs (English + Chinese), placed right after
pager.space.📝 Changelog
pager.hugContentfor the discrete legendpager.hugContent配置文档☑️ Self-Check before Merge