Skip to content

Comments

docs: 增加 tooltip 顺序的 faq#7265

Merged
interstellarmt merged 3 commits intov5from
docs-add-faq
Jan 15, 2026
Merged

docs: 增加 tooltip 顺序的 faq#7265
interstellarmt merged 3 commits intov5from
docs-add-faq

Conversation

@interstellarmt
Copy link
Member

Checklist
  • documents are updated
Description of change

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @interstellarmt, 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 enhances the documentation by introducing a new FAQ entry that clarifies the behavior of Tooltip and Legend sorting in G2 charts. It provides users with a clear understanding of why these components might display data in different orders and offers a direct, configurable solution to synchronize their sorting, thereby improving data interpretation and user experience.

Highlights

  • New FAQ Entry: A new FAQ entry has been added to the documentation, addressing a common issue in data visualization.
  • Tooltip and Legend Order Inconsistency: The new FAQ clarifies the problem of inconsistent sorting order between Tooltips and Legends in multi-series and multi-axis charts.
  • Cause Analysis: It explains that Legends sort by definition order, while Tooltips default to sorting by visual position (Y-coordinate), leading to discrepancies.
  • Solution Provided: A solution is provided using the interaction.tooltip.sort configuration to customize Tooltip sorting rules to match the Legend order.
  • Code Examples: Practical JavaScript code examples are included for various custom sorting scenarios, such as matching legend order, alphabetical sorting, descending value sorting, and custom priority.
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
Contributor

@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 新增了关于 G2 中 Tooltip 和图例顺序不一致问题的 FAQ 文档,包括中英文两个版本。文档清晰地解释了问题原因,并提供了使用 interaction.tooltip.sort 的解决方案和代码示例,内容翔实,对用户很有帮助。

我在代码示例中发现一处可以改进的地方:为了保持示例代码的一致性和可读性,建议为 callmock 折线图的 encode 配置显式添加 series 通道。具体建议请见文件中的评论。

interstellarmt and others added 2 commits January 14, 2026 16:15
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@coveralls
Copy link

coveralls commented Jan 14, 2026

Pull Request Test Coverage Report for Build 20987149821

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 79.949%

Totals Coverage Status
Change from base Build 20802814813: 0.0%
Covered Lines: 10502
Relevant Lines: 12596

💛 - Coveralls

@interstellarmt interstellarmt merged commit c8e4f24 into v5 Jan 15, 2026
5 of 6 checks passed
@interstellarmt interstellarmt deleted the docs-add-faq branch January 15, 2026 06:58
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