Skip to content

Conversation

@tangying1027
Copy link
Contributor

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Description of change

@tangying1027 tangying1027 merged commit 3ec45bd into master Oct 17, 2025
4 of 6 checks passed
@tangying1027 tangying1027 deleted the dev-ty branch October 17, 2025 07:25
@gemini-code-assist
Copy link

Summary of Changes

Hello @tangying1027, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

本次拉取请求主要更新了 AntV F2 图表库的文档和示例。核心目的是增强图例组件的展示和说明,特别是新增了图例布局的示例,并对现有的饼图示例进行了优化和调整,使其更清晰、更符合实际使用场景。此外,还对部分文档标题进行了精简。

Highlights

  • 新增图例布局示例: 增加了新的 layoutMode.jsx 示例,展示了图例的自适应布局功能。
  • 更新图例文档: 在中文图例文档中新增了“布局方式”章节,并更新了相关示例链接。
  • 优化饼图示例: 多个饼图示例(labelline-pie.jsx, pie-with-label.jsx, selection.jsx)进行了调整,包括半径、标签类型(spider)和数据简化。
  • 精简文档标题: Shape 组件的中文文档标题从“Shape 组件与图形标签”精简为“图形标签”。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 主要更新了饼图和图例的官网文档和示例。代码审查发现了一些可以改进的地方:

  • 新增的图例布局示例 (layoutMode.jsx) 中包含未使用的冗余数据属性,建议移除以保持代码整洁。
  • 图例的文档 (index.zh.md) 中有两处描述不一致或不准确的地方,可能会误导用户,建议进行修正以提高文档质量。
    其他关于饼图示例的修改主要是视觉调整和功能增强(如增加 spider 类型的标签),看起来没有问题。

Comment on lines +7 to +13
{ genre: '债券基金', sold: 275, a: '1' },
{ genre: '申万宏源固守+基金指数', sold: 115, a: '1' },
{ genre: '基金指数', sold: 120, a: '1' },
{ genre: '股票基金', sold: 300, a: '1' },
{ genre: '混合基金', sold: 180, a: '1' },
{ genre: '货币基金', sold: 90, a: '1' },
{ genre: 'QDII基金', sold: 60, a: '1' },

Choose a reason for hiding this comment

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

medium

示例数据 multiLineData 中的 a: '1' 属性在 <Interval /> 组件中并未使用。为了保持示例代码的简洁和清晰,建议移除这个未使用的属性。

Suggested change
{ genre: '债券基金', sold: 275, a: '1' },
{ genre: '申万宏源固守+基金指数', sold: 115, a: '1' },
{ genre: '基金指数', sold: 120, a: '1' },
{ genre: '股票基金', sold: 300, a: '1' },
{ genre: '混合基金', sold: 180, a: '1' },
{ genre: '货币基金', sold: 90, a: '1' },
{ genre: 'QDII基金', sold: 60, a: '1' },
{ genre: '债券基金', sold: 275 },
{ genre: '申万宏源固守+基金指数', sold: 115 },
{ genre: '基金指数', sold: 120 },
{ genre: '股票基金', sold: 300 },
{ genre: '混合基金', sold: 180 },
{ genre: '货币基金', sold: 90 },
{ genre: 'QDII基金', sold: 60 },


### 布局方式

- [基础图例](./demo/legend.jsx):展示基本的图例组件。

Choose a reason for hiding this comment

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

medium

此处的列表项内容看起来是复制粘贴错误。它位于“布局方式”章节下,但链接和描述都是关于“基础图例”。这会给用户带来困惑。建议更新此处的链接和描述,使其与本章节内容(图例布局)和下方的代码示例(layoutMode="adaptive")保持一致。

Suggested change
- [基础图例](./demo/legend.jsx)展示基本的图例组件
- [图例布局](./demo/layoutMode.jsx)展示图例的自适应布局方式


- [自定义图例](./demo/custom.jsx):自定义样式和布局的图例。
- [可交互图例](./demo/interactive.jsx)支持点击交互的图例组件
- [可交互图例](./demo/layoutMode.jsx)两种布局方式

Choose a reason for hiding this comment

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

medium

描述“两种布局方式”不准确。链接的 layoutMode.jsx 示例仅演示了 adaptive 一种布局方式。为了避免误导,建议将描述修改为更能反映示例内容。例如,可以强调其交互性和自适应布局的特点。

Suggested change
- [可交互图例](./demo/layoutMode.jsx)两种布局方式
- [可交互图例](./demo/layoutMode.jsx)支持交互和自适应布局的图例

@github-actions
Copy link

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
f2/dist/index.js = 1,702.08 kB 1,702.08 kB = 322.19 kB 322.19 kB
f2/dist/index.min.js = 531.41 kB 531.41 kB = 159.76 kB 159.76 kB

Significant size changes

Includes any change greater than 0.2%:
(No significant changes)

Generated by 🚫 dangerJS against 596c724

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants