echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] Sankey图的series.edgeLabel.distance配置项设置关系边文本标签距离图形元素的距离无效

Open zq1203 opened this issue 2 years ago • 3 comments

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=sankey-simple

Steps to Reproduce

sankey

option = { series: { type: 'sankey', // layout: 'none', edgeLabel:{ distance:50, show: true, }, levels:[ { depth: 0, itemStyle: { color: '#fbb4ae' }, } ], emphasis: { focus: 'adjacency' }, data: [ { name: 'a' }, { name: 'b' }, { name: 'a1' }, { name: 'a2' }, { name: 'b1' }, { name: 'c' } ], links: [ { source: 'a', target: 'a1', value: 5 }, { source: 'a', target: 'a2', value: 3 }, { source: 'b', target: 'b1', value: 8 }, { source: 'a', target: 'b1', value: 3 }, { source: 'b1', target: 'a1', value: 1 }, { source: 'b1', target: 'c', value: 2 } ] } };

Current Behavior

在sankey中设置series.edgeLabel.distance无效,标签一直居中

Expected Behavior

设置series.edgeLabel.distance应该有效

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

zq1203 avatar Mar 13 '24 06:03 zq1203

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

[Bug] The series.edgeLabel.distance configuration item of the Sankey diagram sets the distance between the edge text label and the graphic element invalid.

echarts-bot[bot] avatar Mar 13 '24 06:03 echarts-bot[bot]

API does not support edgeLabel.distance for sankey. But there is edgeLabel.position. 📌 please close issue if problem solved.

helgasoft avatar Mar 13 '24 20:03 helgasoft

I don't think edgeLabel.distance solve the problem. This is Sankey plot. I don't see option for "position" in sankey @helgasoft

And "distance" doesn't work indeed: https://echarts.apache.org/en/option.html#series-sankey.edgeLabel.distance

Sometimes this is so confusing as the option under edgeLabel could be different across parental graph type "sankey" and "graph"

gmhhope avatar Dec 14 '24 17:12 gmhhope