Skip to content

Conversation

@Yzing
Copy link

@Yzing Yzing commented Dec 1, 2025

PR includes

  • fixed #0
  • add / modify test cases
  • documents, demos

@gemini-code-assist
Copy link

Summary of Changes

Hello @Yzing, 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!

This pull request introduces new documentation for the advise method, which enables natural language-based chart recommendations. It aims to provide users with clear guidance and examples on how to leverage this feature for generating data visualizations. Additionally, it includes minor visual improvements to existing documentation for the extract module.

Highlights

  • New Documentation for advise method: Comprehensive documentation has been added for the advise method, explaining its functionality to provide chart recommendations from natural language input, outputting antvSpec.
  • Usage Examples for advise: The new documentation includes practical TypeScript code examples demonstrating how to use the advise method for both statistical and relational chart recommendations, along with their expected JSON outputs.
  • Image Display Enhancements: Minor styling updates were applied to the extract documentation files (both English and Chinese versions) to improve the display of images, specifically by centering them and setting a fixed height.
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

This pull request adds documentation for the advise method in both English and Chinese, and updates the styling for an image in the extract documentation. My review focuses on improving the correctness and clarity of the new documentation. I've pointed out a broken link, some issues with example JSON snippets (duplicate data, invalid syntax), and an invalid CSS property. Applying these suggestions will make the documentation more accurate and helpful for users.

- /en/docs/guide/tech/advise
---

The `advise` method provides chart recommendations. It takes natural language as input and outputs a configuration structure in **[antvSpec](/api/antv-spec/antv-spec)** format. This antvSpec can be used to render visualizations in **[gptvis]()** or other products that support the antvSpec format.

Choose a reason for hiding this comment

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

medium

The link for gptvis is broken. It currently points to an empty destination. Based on the file structure, you probably intend to link to the gpt-vis render API page.

Suggested change
The `advise` method provides chart recommendations. It takes natural language as input and outputs a configuration structure in **[antvSpec](/api/antv-spec/antv-spec)** format. This antvSpec can be used to render visualizations in **[gptvis]()** or other products that support the antvSpec format.
The `advise` method provides chart recommendations. It takes natural language as input and outputs a configuration structure in **[antvSpec](/api/antv-spec/antv-spec)** format. This antvSpec can be used to render visualizations in **[gptvis](/api/render/gpt-vis)** or other products that support the antvSpec format.

Comment on lines +70 to +91
{
"type": "line",
"data": [
1200000,
1300000,
1400000,
1500000,
1600000
],
"axisYTitle": "Sales (units)"
},
{
"type": "line",
"data": [
2,
2.5,
3,
3.5,
4
],
"axisYTitle": "Return Rate (%)"
}

Choose a reason for hiding this comment

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

medium

The series array in the example JSON output contains duplicate entries. The last two objects appear to be duplicates of the first two and should be removed to avoid confusion and present a correct example.

- /zh/docs/guide/tech/advise
---

`advise` 图表推荐方法,输入自然语言然后可推荐出 **[antvSpec](/api/antv-spec/antv-spec)** 的配置结构,antvSpec 可以用于 **[gptvis]()** 或其他支持 antvSpec 的产品进行渲染

Choose a reason for hiding this comment

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

medium

The link for gptvis is broken. It currently points to an empty destination. Based on the file structure, you probably intend to link to the gpt-vis render API page.

Suggested change
`advise` 图表推荐方法,输入自然语言然后可推荐出 **[antvSpec](/api/antv-spec/antv-spec)** 的配置结构,antvSpec 可以用于 **[gptvis]()** 或其他支持 antvSpec 的产品进行渲染
`advise` 图表推荐方法,输入自然语言然后可推荐出 **[antvSpec](/api/antv-spec/antv-spec)** 的配置结构,antvSpec 可以用于 **[gptvis](/api/render/gpt-vis)** 或其他支持 antvSpec 的产品进行渲染

- 输出为:
```json
{
"type ": "dual-axes",

Choose a reason for hiding this comment

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

medium

The JSON key "type " has a trailing space. This is likely a typo and can lead to confusion or parsing errors. Please remove the trailing space.

Suggested change
"type ": "dual-axes",
"type": "dual-axes",

Comment on lines +69 to +90
{
"type": "line",
"data": [
1200000,
1300000,
1400000,
1500000,
1600000
],
"axisYTitle": "Sales (件)"
},
{
"type": "line",
"data": [
2,
2.5,
3,
3.5,
4
],
"axisYTitle": "Return Rate (%)"
}

Choose a reason for hiding this comment

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

medium

The series array in the example JSON output contains duplicate entries. The last two objects appear to be duplicates of the first two and should be removed to avoid confusion and present a correct example.

- 输出为:
```json
{
"type ": "network-graph",

Choose a reason for hiding this comment

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

medium

The JSON key "type " has a trailing space. This is likely a typo and can lead to confusion or parsing errors. Please remove the trailing space.

Suggested change
"type ": "network-graph",
"type": "network-graph",


<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*pJ-9TJUrKHcAAAAAgFAAAAgAemJ7AQ/original"></img>
<div style="display:flex;justify-content:center">
<img style="height: 200px;align: center" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*pJ-9TJUrKHcAAAAAgFAAAAgAemJ7AQ/original"></img>

Choose a reason for hiding this comment

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

medium

The CSS property align: center is not valid. The align property is not a standard CSS property for styling. Since the parent div uses display: flex and justify-content: center, the image is already horizontally centered. The align property is unnecessary and should be removed.

Suggested change
<img style="height: 200px;align: center" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*pJ-9TJUrKHcAAAAAgFAAAAgAemJ7AQ/original"></img>
<img style="height: 200px;" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*pJ-9TJUrKHcAAAAAgFAAAAgAemJ7AQ/original"></img>


<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aRzfT5N-ZvsAAAAAgFAAAAgAemJ7AQ/original"></img>
<div style="display:flex;justify-content:center">
<img style="height: 200px;align: center" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aRzfT5N-ZvsAAAAAgFAAAAgAemJ7AQ/original"></img>

Choose a reason for hiding this comment

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

medium

The CSS property align: center is not valid. The align property is not a standard CSS property for styling. Since the parent div uses display: flex and justify-content: center, the image is already horizontally centered. The align property is unnecessary and should be removed.

Suggested change
<img style="height: 200px;align: center" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aRzfT5N-ZvsAAAAAgFAAAAgAemJ7AQ/original"></img>
<img style="height: 200px;" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aRzfT5N-ZvsAAAAAgFAAAAgAemJ7AQ/original"></img>

@leondt1 leondt1 merged commit e4b5496 into v4 Dec 1, 2025
1 check passed
@leondt1 leondt1 deleted the docs/guide-advise branch December 1, 2025 02:32
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.

3 participants