echarts icon indicating copy to clipboard operation
echarts copied to clipboard

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

Open xiao821 opened this issue 1 year ago • 4 comments

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?

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

xiao821 avatar Nov 25 '24 09:11 xiao821

@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?

echarts-bot[bot] avatar Nov 25 '24 09:11 echarts-bot[bot]

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.

helgasoft avatar Nov 25 '24 18:11 helgasoft

I suggest adding this feature configuration item to make the echarts tree more complete

worldstop avatar Dec 26 '24 09:12 worldstop

调整树形绘制各树干之间的线条长度

我怀疑这不是一个好主意,因为它会干扰节点展开/折叠时的自动调整大小。

Perhaps we need to consider it from an algorithmic perspective

worldstop avatar Dec 26 '24 09:12 worldstop