Skip to content

docs: supply documents for pager.hugContent of discrete legend#4621

Merged
skie1997 merged 1 commit into
VisActor:developfrom
g1f9:docs/legend-pager-hug-content
Jul 14, 2026
Merged

docs: supply documents for pager.hugContent of discrete legend#4621
skie1997 merged 1 commit into
VisActor:developfrom
g1f9:docs/legend-pager-hug-content

Conversation

@g1f9

@g1f9 g1f9 commented Jul 14, 2026

Copy link
Copy Markdown

🤔 This is a ...

  • Site / documentation update

🔗 Related issue link

Documents the pager.hugContent option for the discrete legend, added in VRender PR VisActor/VRender#2097. The option flows into VChart automatically through IPager 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 (default false, 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

Language Changelog
🇺🇸 English docs: document pager.hugContent for the discrete legend
🇨🇳 Chinese docs: 补充离散图例 pager.hugContent 配置文档

☑️ Self-Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions github-actions Bot added the docs label Jul 14, 2026
@skie1997
skie1997 merged commit 94ea07c into VisActor:develop Jul 14, 2026
2 checks passed
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.

2 participants