Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: In legend, a maximum of 3 nodes or edges are displayed side by side. I want to increase this number. #6764

Closed
RackweLLizm opened this issue Feb 10, 2025 · 2 comments

Comments

@RackweLLizm
Copy link

Describe the feature / 功能描述

Image

I want to make it so that it completely covers the area above horizontally. This way it will be easy for users to click and select. As it stands, they have to constantly navigate to the side pages with the arrow keys.

Are you willing to contribute? / 是否愿意参与贡献?

✅ Yes / 是

@RackweLLizm RackweLLizm added the waiting for maintainer Triage or intervention needed from a maintainer. label Feb 10, 2025
Copy link

It seems like you want to modify the legend in antvis/G6 to display more than 3 nodes or edges side by side, allowing it to cover the area horizontally for easier user interaction. Since you are willing to contribute, you might want to look into the configuration options for the legend in G6 or modify the source code to achieve this.

Here's a general approach you can take:

  1. Explore Legend Configuration: Check if there are existing configuration options in G6 that allow you to change the number of items displayed in the legend. This might involve looking into the documentation or source code.

  2. Modify Source Code: If the configuration isn't available, you might need to modify the source code. Look for the part of the code that handles the rendering of the legend and adjust the logic to increase the number of items displayed.

  3. Contribute Back: Since you are willing to contribute, once you have a working solution, consider submitting a pull request to the G6 repository with your changes.

If you need further assistance or specific guidance on where to look in the code, feel free to ask!

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@Aarebecca
Copy link
Contributor

You can configure the following configuration of Legend to meet your needs

  • width
  • height

when use grid layout

  • gridRow
  • gridCol

Documentation for Legend is available on: https://github.com/antvis/component/blob/master/docs/components/legend.md

You may need to use a translation tool

@github-actions github-actions bot removed the waiting for maintainer Triage or intervention needed from a maintainer. label Feb 10, 2025
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

No branches or pull requests

2 participants