antvis/G6

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

RackweLLizm posted onGitHub

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 / 是


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!

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

posted by petercat-assistant[bot] 2 months ago

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

posted by Aarebecca 2 months ago

Fund this Issue

$0.00
Funded

Pull requests