nowthis / sankeymatic

Make Beautiful Flow Diagrams
http://sankeymatic.com/build/
ISC License
841 stars 122 forks source link

Broken? "Place all flow origins at the left edge" #78

Closed parallelprovideo closed 2 months ago

parallelprovideo commented 3 months ago

Toggling this on and off does not make any changes to the diagram.

I can reverse the diagram and then see changes when toggling it.

I can also see the final result I am looking for in the reverse view with "Place all flow endpoints at the right edge" toggled, so I do believe the final result is possible.

Something appears to not be working?

Thanks for your help!

nowthis commented 3 months ago

I've tried on the site and it's working for me - here's an example diagram for which both the 'left edge' and 'right edge' checkboxes have an effect.

Would you mind sharing your diagram's data in some way, or perhaps a screenshot (without labels if you prefer)?

parallelprovideo commented 3 months ago

Hi Steve,

Thanks for taking the time to help me out!

https://sankeymatic.com/build/?i=MIQwzgFgZgNg9gdwAQG0AsBGAHABgLpKiRJwB2SAEiKQCYBQR08yKArDhwQMogBuAlqQDmYBuCaJUANg74kXAA4BTWoKF0AIv15KwAFwC2KvWGkBOXAUaxEdOwFEQAJ1JrTKDHOvM6ASVJ6Sk66eqieBI4ubnSRrsLurFbiNghikABGIADGANaoiUix0UXxqADsXsk%2BAApwgiblciUidADicDouRgFhWADMSZApbVwAKr0DSO2dpN16dgv%2BWXBGYThSZoMSqdXOIDAwSjBIABQAQk7UNCoAlGsbBEsrSnRcEM5KEHAw105IADJwainC5XW73TZIXaXA5HEGXWi3PykZarFAAJikWCkW2G0P2h2O5wR11IdwxWJxSCeRjoAHUQEJdPCwWTUJjsQR8bCiaDEWTkailKhMGUyriansead%2Ds5%2BGAwCByaLxdSUc96YzmSdZU55YrlRgxVypYSZXKFUqFox5Hw3NIcOi5FodPo5qIKL4uABBGV3AByAFcztQ8igzDICC6Qu7XnbSh4sOwCBQ4IGwMKeAJ4nRU%2BnM%2DGRL1k0gAGIUH1%2BpB0pT7PQQMD8AwKQ5x7NFjHheSCHJqMuB2iiLg9vulgc0dzorvVYJgLJ6hR6fhkW3toeF9x9Tjd0i94T9wevEf7seD1BbppGJxMlEAT1X0Sz9pQ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ATXEZIhmt4NKmCvkPYInQMxCEuAoXWGj%2BF6FylkCAghUQtiUIEfQcAkCkw%2BPodhv0jimGoWnWQshH78GuEgQxZihAQBgPwAJoRsFYHnlAMgegoDZGFIqYqABaDMeooDzyCaTN%2BcD9zYPRPPYIHClyun4N3X%2BY8h4TyEK4aRpScBOPSEcO6qwQAKGUM4dRr9inCiXkgBAShgkQFCBBWpHD6kwDQTAKi%2DCWm1icO0oeUBAwHAUMEOBjYVyKKHllRsuNRm2CHr0%2Dpgyx4jKOFs56fUBFCP2ME8gCTcGkNMYA4Uly4ARP4LM0I9TInBDXsEEAOQsr1CQGgOg4zJnfInqEAA5AAGiwVC%2BeyylBQH4AADyQFCgAJAioeNVD5ooxQil6Rg4CHwzKEEA9815ID6CA5h88aD0qMLlJAcxTahiUP5ERvi0nyiXAYTIHCUTMnkUAA

Above is my exact Sankey (I shortened the link but it should open to the proper full link) *it worked in email but it doesnt work on GitHub, sorry

I also entered my data into the Sankey link you sent and the toggle again didn't change anything.

So is there something I have done wrong in my formatting of the data?

Thanks,

Branden Murphy

nowthis commented 3 months ago

Ok, I see the issue now. It seems to be a problem with the initial layout phase, not with the checkbox itself.

If the layout algorithm would put the items in the top left of your diagram one more stage to the right instead, then the checkbox would have something to affect; as it is right now, everything starts out already in the first stage and so nothing changes.

I will look into this, but I can't promise a particular timeline.

nowthis commented 3 months ago

Commit 088a339 ought to handle this issue, and it is now posted on the site.

Clicking the public-diagram link posted above will now render differently, and checking the "Place all flow origins at the left edge" checkbox does now have an effect.

The commit message for the above change describes a bit more about the change, but the easiest thing to see is a basic comparison, using these inputs:

i [1] j
a [2] b
b [1] f
b [1] c
c [2] d
e [1] c
g [1] h
h [1] d
a [1] i

Before the change, the output looked like this: example-before The flow g->h ought to be mirroring the placement of the flow i->j, but it's all the way to the left instead. Put another way, there's no real reason for h->d to be crossing two stages.

After the change, the same inputs produce the right symmetrical outcome: example-after

parallelprovideo commented 2 months ago

Amazing!

Thank you so much for changing this - I've really been enjoying using the site since I found it a few months ago!

All the best,

Branden Murphy Video Producer, Owner

Parallel Productions Inc. parallelproductions.ca https://www.parallelproductions.ca/ (705) 890-1772

On Sun, Mar 31, 2024 at 4:43 PM Steve Bogart @.***> wrote:

Commit 088a339 https://github.com/nowthis/sankeymatic/commit/088a33992328a5310d9f6cfce832ee61c6b6430f ought to handle this issue, and it is now posted on the site.

Clicking the public-diagram link posted above will now render differently, and checking the "Place all flow origins at the left edge" checkbox does now have an effect.

The commit message for the above change describes a bit more about the change, but the easiest thing to see is a basic comparison, using these inputs:

i [1] j a [2] b b [1] f b [1] c c [2] d e [1] c g [1] h h [1] d a [1] i

Before the change, the output looked like this: example-before.png (view on web) https://github.com/nowthis/sankeymatic/assets/5286645/037a9db7-9c00-4a54-95e1-5f1b666187c2 The flow g->h ought to be mirroring the placement of the flow i->j, but it's all the way to the left instead. Put another way, there's no real reason for h->d to be crossing two stages.

After the change, the same inputs produce the right symmetrical outcome: example-after.png (view on web) https://github.com/nowthis/sankeymatic/assets/5286645/33b13219-a929-4c47-b8b7-f471b550533e

— Reply to this email directly, view it on GitHub https://github.com/nowthis/sankeymatic/issues/78#issuecomment-2028900081, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHLUW5IC3ZDAPWFZYWHA5U3Y3BYP7AVCNFSM6AAAAABFJ634JSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYHEYDAMBYGE . You are receiving this because you authored the thread.Message ID: @.***>