apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.58k stars 19.61k forks source link

关系图在大量节点的时候使用edgeSymbol会导致标签虚化 #9648

Closed hadg closed 5 years ago

hadg commented 5 years ago

General Questions

In this issue, I have provided information with: 在这个 issue 中我提供了以下信息:

Issue Type

Issue Details

关系图在大量节点的时候使用edgeSymbol会导致标签虚化

Expected Behavior

标签正常显示

Current Behavior

标签被虚化

Online Example

官方的例子(http://echarts.baidu.com/examples/editor.html?c=graph-npm

正常显示: image

加入edgeSymbol: ['none', 'arrow']属性后标签虚化了: image

修改后的代码:

$.getJSON('data/asset/data/npmdepgraph.min10.json', function (json) {
    myChart.hideLoading();
    myChart.setOption(option = {
        title: {
            text: 'NPM Dependencies'
        },
        animationDurationUpdate: 1500,
        animationEasingUpdate: 'quinticInOut',
        series : [
            {
                type: 'graph',
                layout: 'none',
                // progressiveThreshold: 700,
                edgeSymbol: ['none', 'arrow'],
                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);
});

Topics

Anything Else We Need to Know

Environment

brengithub commented 5 years ago

遇到同样问题。 另外能否增加一个功能, link 也可以被筛选。目前没有此功能

100pah commented 5 years ago

It has been fixed in 4.3.0