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

Sankey diagram order can't be specified #4986

Closed
jarben opened this issue Jan 20, 2017 · 16 comments
Closed

Sankey diagram order can't be specified #4986

jarben opened this issue Jan 20, 2017 · 16 comments
Assignees
Labels
enhancement resolved stale Inactive for a long time. Will be closed in 7 days.

Comments

@jarben
Copy link
Contributor

jarben commented Jan 20, 2017

Version: 3.4.0

I'm struggling to find out how to manage order of nodes in the sankey diagram. For example, this diagram:

image

is defined (source attached sankey-order.zip) in this order:

nodes:

  1. Financial Services

  2. Energy & Utilities

  3. Mobility Transportation

  4. Germany

  5. Italy

  6. Netherlands

links:

  1. Financial Services -> Germany
  2. Financial Services -> Italy
  3. Financial Services - Netherlands
    ...

where the order on the diagram is:

  1. Mobility Transportation

  2. Financial Services

  3. Energy & Utilities

  4. Germany

  5. Netherlands

  6. Italy

Which doesn't reflect the source code. Is there any way to do this - provide some sort of order index or simply order by given order?

Thanks for any suggestion!

@jarben
Copy link
Contributor Author

jarben commented Jan 20, 2017

It seems like the order is based on values, I've changed all values to "1" and now it shows as:
image

Is there any way to change ordering, say by order in the source file or provided sortFn?

@jarben
Copy link
Contributor Author

jarben commented May 24, 2017

Any update on this?

@iandvt
Copy link

iandvt commented Jul 12, 2017

+1 - Another option could be allowing layoutIterations to be set to 0. Allowing the user to sort the nodes

@JamieChung
Copy link

JamieChung commented Aug 10, 2017

+1 Would love more control on how to change the ordering of the nodes.

@shyamsdmx
Copy link

shyamsdmx commented Feb 27, 2018

+1 Any update on the issue ?

@deqingli deqingli self-assigned this Mar 7, 2018
@deqingli
Copy link
Member

deqingli commented Apr 12, 2018

Hi everyone,I will follow this issue, sorry for letting you wait so long!

@deqingli deqingli self-assigned this Apr 12, 2018
@deqingli
Copy link
Member

deqingli commented Apr 18, 2018

Hi everyone, I have fixed this problem, which will be released next version. Now nodes sort by the order in series.data and will not be changed even your resize the diagram. Thanks for your suggestions!

@deqingli
Copy link
Member

deqingli commented Apr 18, 2018

If there any problem after you try the new version, please reopen this issue.

@lixiaohe
Copy link

lixiaohe commented Jan 28, 2019

这个问题,在修改了links里面的value值的时候排序又会发生改变了

@deqingli deqingli reopened this Mar 11, 2019
@echarts-bot echarts-bot bot added the invalid label Mar 11, 2019
@echarts-bot
Copy link

echarts-bot bot commented Mar 11, 2019

This issue is not created using issue template so I'm going to close it. 🙊
Sorry for this, but it helps save our maintainers' time so that more developers get helped.
Feel free to create another issue using the issue template.

这个 issue 未使用 issue 模板 创建,所以我将关闭此 issue。
为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
如果您愿意,可以请使用 issue 模板重新创建 issue。

@echarts-bot echarts-bot bot closed this as completed Mar 11, 2019
@ericksepulveda
Copy link

ericksepulveda commented Jul 4, 2019

any updates on how to do this in 2019?

@deqingli deqingli reopened this Nov 7, 2019
@jbadilla
Copy link

jbadilla commented Nov 26, 2019

Hey @deqingli ,

"Now nodes sort by the order in series.data and will not be changed even your resize the diagram"

I think this is not true. I have reordered my data array to fit the order I want and it still does not work.

@iandvt What is this solution with layoutIterations? Anyway to disable this?

@pvictor
Copy link

pvictor commented Dec 6, 2019

@jbadilla you can use layoutIterations: 0 to disable it, and apparently order is preserved.

@deqingli
Copy link
Member

deqingli commented Jan 13, 2020

Hey @deqingli ,

"Now nodes sort by the order in series.data and will not be changed even your resize the diagram"

I think this is not true. I have reordered my data array to fit the order I want and it still does not work.

@iandvt What is this solution with layoutIterations? Anyway to disable this?

Hi @jbadilla, If you want the node ordered by the series.data, you can set layoutIterations: 0.

@deqingli deqingli added resolved and removed invalid labels Jan 13, 2020
@github-actions
Copy link

github-actions bot commented Jan 12, 2022

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

@github-actions github-actions bot added the stale Inactive for a long time. Will be closed in 7 days. label Jan 12, 2022
@github-actions
Copy link

github-actions bot commented Jan 19, 2022

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement resolved stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

10 participants