apache / echarts

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

Tree graph node overlaps with each other, as node symbol size gets bigger. #13605

Open kennethburla opened 4 years ago

kennethburla commented 4 years ago

Version

4.9.0

Steps to reproduce

Use this option in the editor

option = {
        tooltip: {
            trigger: 'item',
            triggerOn: 'mousemove'
        },
        series: [
            {
                type: 'tree',

                data: [data],

                top: '1%',
                left: '7%',
                bottom: '1%',
                right: '20%',

                symbolSize: 100
                ,

                label: {
                    position: 'left',
                    verticalAlign: 'middle',
                    align: 'right',
                    fontSize: 9
                },

                leaves: {
                    label: {
                        position: 'right',
                        verticalAlign: 'middle',
                        align: 'left'
                    }
                },

                expandAndCollapse: true,
                animationDuration: 550,
                animationDurationUpdate: 750
            }
        ]
    }

What is expected?

Each node should auto adjust their margins/distance from each other as each node symbol size change.

What is actually happening?

Nodes overlaps with each other as their symbol size changes

echarts-bot[bot] commented 4 years ago

Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

kennethburla commented 3 years ago

Hi. I would like to know any updates on this issue, though I think this is more of a feature. Hoping for a solution on this. Thanks a lot!

chiranshu14 commented 3 years ago

@IamKennethBurla Did you find any solution to avoid overlapping of nodes in a graph?

zuroma999 commented 2 years ago

I'd also love to know if anyone has a solution for this. Not only one fixed size for all nodes, but using a variable symbolSize for each node, would be great if the tree spaced each node properly.

marnunez commented 1 year ago

Hi! I stumbled with this exact problem. My current (poor) solution is to scale down the size of the symbols depending of the amount of nodes in that level.

image

I dynamically obtain the width of the container, and make sure the size is scaled down on resize. But this does not serve further down the tree, as the first level nodes still overlap

image

Any suggestions?

shmilyoo commented 1 year ago

any updates? I have a same issue?