Skip to content

[Feature] The label will not restore the transparency when moving out in Graph #19009

@Pyrokine

Description

@Pyrokine

What problem does this feature solve?

When I hover the mouse on the label in Graph, the irrelavent labels and lines will become transparent. However, sometimes the label that I hovered will not restore the transparency after moving out my cursor.
Here is the demo with pyecharts and the developer of pyecharts thought it might be a bug in echarts

from pyecharts import options as opts
from pyecharts.charts import Graph

step_x, step_y = 300, 40


def generate_html():
    graph_nodes, graph_links = [], []

    for i in range(64):
        graph_nodes.append(opts.GraphNode(
            name="this_is_a_very_long_name_" + str(i),
            x=step_x * (i % 4),
            y=step_y * int(i / 4),
            is_fixed=True,
            label_opts=opts.LabelOpts(
                color='black',
                font_size=20,
                position='top',
                distance=10,
                border_width=1,
                border_color='black'
            ),
            symbol_size=00
        ))
        for j in range(64):
            graph_links.append(opts.GraphLink(
                source="this_is_a_very_long_name_" + str(i),
                target="this_is_a_very_long_name_" + str(j),
                symbol=[None, 'arrow']
            ))

    graph = (
        Graph(init_opts=opts.InitOpts(
            width='1700px',
            height='900px',
            renderer='svg'
        ))
        .add(
            '',
            nodes=graph_nodes,
            links=graph_links,
            repulsion=5000,
            is_draggable=False,
        )
        .set_global_opts()
        .render('temp.html')
    )


if __name__ == '__main__':
    generate_html()

What does the proposed API look like?

Figure out if it is a bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions