Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

Syncs incremental label documentation updates from antvis/g2 v5 to ant-design-charts, adding the new overflowStroke transform type and enhanced exceedAdjust configuration options.

Changes

English Documentation (label.en.md)

  • Added overview, elements, and usage sections with visual examples
  • Added configuration options table covering all label properties
  • Added text & innerHTML section with React/Ant Design Charts examples

Chinese Documentation (label.zh.md)

  • New overflowStroke transform: Adds stroke to overflowing labels for improved readability, similar to subtitle text with outline effect
    • Problem/solution examples with Column chart
    • Configuration table (threshold, palette)
  • Enhanced exceedAdjust configuration:
    • Added bounds option ('view' | 'main') to control detection boundary
    • Added offsetX/offsetY for fine-tuned adjustment positioning
    • Split examples demonstrating view vs main boundary behavior with visual diagram

Code Example

// Before: only basic exceedAdjust
labels: [{ 
  text: 'price', 
  transform: [{ type: 'exceedAdjust' }] 
}]

// After: configurable boundary and offsets
labels: [{ 
  text: 'price', 
  transform: [{ 
    type: 'exceedAdjust', 
    bounds: 'main',  // Don't cover axis labels
    offsetX: 15       // Extra horizontal padding
  }] 
}]

// New overflowStroke for better overflow readability
labels: [{
  text: 'frequency',
  transform: [
    { type: 'contrastReverse' },
    { type: 'overflowStroke', threshold: 2 }
  ]
}]

All code examples adapted to use Ant Design Charts React components (Column, Line, etc.) instead of raw G2 Chart API.

Original prompt

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

同步要求:

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

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@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 content for label documentation Sync label documentation from G2: add overflowStroke transform and enhance exceedAdjust config Jan 6, 2026
Copilot AI requested a review from lxfu1 January 6, 2026 09:12
@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 406224e into master Jan 7, 2026
8 checks passed
@lxfu1 lxfu1 deleted the copilot/sync-label-docs-content branch January 7, 2026 07:11
@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