We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sankey图如果target与source存在相同的值,就会导致浏览器崩溃
option = { series: { type: 'sankey', layout:'none', data: [{ name: 'a' }, { name: 'b' }, { name: 'a1' }, { name: 'a2' }, { name: 'b1' }, { name: 'c' }], links: [{ source: 'a', target: 'a1', value: 5 }, { source: 'a', target: 'b', value: 3 }, { source: 'b', target: 'a', value: 8 }, { source: 'a', target: 'b1', value: 3 }, { source: 'b1', target: 'a1', value: 1 }, { source: 'b1', target: 'c', value: 2 }] } }
The text was updated successfully, but these errors were encountered:
我看到这个数据里面有环,理论上 sankey 是不支持环状数据的,我会在数据层面约束下
Sorry, something went wrong.
你好,这个问题是由于原始输入数据中存在环导致的。sankey 图理论上只支持有向无环图(DAG, Directed Acyclic Graph),所以原先的布局算法是默认输入数据是有向无环的,当有环的时候就会陷入死循环,当然这主要是我前期开发的时候欠考虑导致的,我会好好反思的。修改后的布局算法是按拓扑顺序遍历计算布局的,如果判断有环就会报错,不再绘制。
修改后的功能会随下个版本一起发布,欢迎大家验证,如果有问题可以 reopen 这个 issue. ~ 祝好
No branches or pull requests
One-line summary [问题简述]
sankey图如果target与source存在相同的值,就会导致浏览器崩溃
Version & Environment [版本及环境]
Expected behaviour [期望结果]
ECharts option [ECharts配置项]
Other comments [其他信息]
The text was updated successfully, but these errors were encountered: