Skip to content

在关系图官网示例中当link线的条数大于1150时鼠标移到节点高亮时不显示节点名字 #6625

@suptwo

Description

@suptwo

One-line summary [问题简述]

在关系图官网示例中当link线的条数大于1150时鼠标移到节点高亮时不显示节点名字

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 最新
  • Browser version [浏览器类型和版本]: 谷歌
  • OS Version [操作系统类型和版本]: 60

Expected behaviour [期望结果]

link线的条数大于1150时鼠标移到节点高亮时显示节点名字

ECharts option [ECharts配置项]

$.getJSON('data/asset/data/npmdepgraph.min10.json', function (json) {
    for (var i = 0; i < 200; i++ ) {
      json.nodes.push({
        color: "#f60",
        label: 'aa'+ i,
        attributes: { },
        y: -i * 10,
        x: -739.36383,
        id: 'aa'+ i,
        size: 1
      })
      json.edges.push({
        sourceID: 'aa'+ i,
        attributes: { },
        targetID: 'aa'+ (i+1),
        size: 1
      });
    }
    myChart.setOption(option = {
        title: {
            text: 'NPM Dependencies'
        },
        animationDurationUpdate: 1500,
        animationEasingUpdate: 'quinticInOut',
        series : [
            {
                type: 'graph',
                layout: 'none',
                // progressiveThreshold: 700,
                data: json.nodes.map(function (node) {
                    return {
                        x: node.x,
                        y: node.y,
                        id: node.id,
                        name: node.label,
                        symbolSize: node.size,
                        itemStyle: {
                            normal: {
                                color: node.color
                            }
                        }
                    };
                }),
                edges: json.edges.map(function (edge) {
                    return {
                        source: edge.sourceID,
                        target: edge.targetID
                    };
                }),
                label: {
                    emphasis: {
                        position: 'right',
                        show: true
                    }
                },
                roam: true,
                focusNodeAdjacency: true,
                lineStyle: {
                    normal: {
                        width: 0.5,
                        curveness: 0.3,
                        opacity: 0.7
                    }
                }
            }
        ]
    }, true);
});
![8](https://user-images.githubusercontent.com/12033906/30191901-95353dcc-9476-11e7-9021-d9b71ad7aa72.png)
![9](https://user-images.githubusercontent.com/12033906/30191902-9552cc34-9476-11e7-8a47-e415052ccb5c.png)

Other comments [其他信息]

Metadata

Metadata

Assignees

No one assigned

    Labels

    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