Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 折线树状图怎么调整每个级别之间的线条长度呢? #20538

Open
xiao821 opened this issue Nov 25, 2024 · 2 comments
Open
Labels
new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@xiao821
Copy link

xiao821 commented Nov 25, 2024

What problem does this feature solve?

const requestData = () => {
let option = {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove'
},
series: [
{
type: 'tree',
id: 0,
name: 'tree1',
data: date.value,
top: '2%',
left: '7%',
bottom: '2%',
right: '22%',
symbolSize: 7,
edgeShape: 'polyline',
edgeForkPosition: '63%',
initialTreeDepth: 3,
lineStyle: {
width: 2
},
label: {
formatter: function (params) {
// console.log('params--value', params.data);
if (params.data.value !== undefined && params.data.value !== null) {
return ${params.data.name}: ${params.data.value};
} else {
return params.data.name;
}
},
position: 'top',
verticalAlign: 'middle',
align: 'right',
color: '#fff',
fontSize: 16,

            },
            leaves: {
                label: {
                    position: 'right',
                    verticalAlign: 'middle',
                    align: 'left'
                }
            },
            itemStyle: {
                color: '#3399ff'  // 收起节点的颜色
            },
            emphasis: {
                focus: 'descendant'
            },
            expandAndCollapse: true,
            animationDuration: 550,
            animationDurationUpdate: 750,
            linkDistance:30,
        }
    ]
};

// 设置图表
mycharts.setOption(option);

}这是我的折现tree图代码,我使用linkDistance去改变节点间的线条长度,但是无效

What does the proposed API look like?

我希望能增加调整线条长度的配置项

@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Nov 25, 2024
Copy link

echarts-bot bot commented Nov 25, 2024

@xiao821 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Feature] How do you adjust the length of the lines between each level in a line treemap?

@helgasoft
Copy link

adjust the length of the lines between each level in a tree chart

I doubt this is a good idea since it will disturb the auto-resizing on expand/collapse of nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants