Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

Synchronizes incremental documentation updates from G2 v5 legend docs to ant-design-charts legend documentation, adding 7 new configuration properties and updating 3 existing descriptions.

New Properties

  • length - Controls legend container length on main axis (width for horizontal, height for vertical)
  • itemSpan - Space allocation array for marker, label, and value components [1, 1, 1]
  • poptip - Tooltip configuration for truncated legend items
  • focus - Enables focus icon for highlighting specific data series
  • focusMarkerSize - Focus icon size (default: 12)
  • defaultSelect - Pre-select legend items on initial render
  • render - Custom HTML renderer for legend content

Updated Descriptions

  • size - Clarified as legend container size (cross-axis dimension)
  • itemSpacing - Updated from [8, 8] to [8, 8, 4] (fourth value applies when focus enabled)
  • nav - Added vertical layout pagination tip with configuration example

Example Usage

legend: {
  color: {
    focus: true,
    focusMarkerSize: 14,
    defaultSelect: ['Series A', 'Series B'],
    poptip: {
      render: (item) => `Full name: ${item.label}`,
      position: 'top'
    }
  }
}

All code examples use Ant Design Charts syntax without G2-specific fields like type: 'interval' or type: 'view'.

Original prompt

http://github.com/antvis/g2/blob/v5/site/docs/manual/component/legend.*.md 目录下的文档内容同步到 https://github.com/ant-design/ant-design-charts/blob/master/site/docs/options/plots/legend.*.md 文件中。

同步要求:

  1. 不能全量覆盖,同步增量内容即可
  2. 示例代码仅同步配置(options),代码结构不要改动

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Sync incremental legend documentation content Sync legend configuration properties from G2 v5 to ant-design-charts Jan 6, 2026
Copilot AI requested a review from lxfu1 January 6, 2026 09:14
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 7, 2026
@lxfu1 lxfu1 marked this pull request as ready for review January 7, 2026 07:11
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 7, 2026
@lxfu1 lxfu1 merged commit 9a2a7aa into master Jan 7, 2026
8 checks passed
@lxfu1 lxfu1 deleted the copilot/sync-legend-docs-content branch January 7, 2026 07:12
@dosubot dosubot bot added the documentation 📖 Improvements or additions to documentation label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📖 Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants