nowthis / sankeymatic

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

Certain word generates error #49

Closed Euramsia closed 3 years ago

Euramsia commented 3 years ago

When I used "Rest" (without quotation marks) as an end node, it scrambled the whole diagram in a weird way. It was definitely the word itself, the position in my list didn't make a difference, but once I changed one letter it worked normally.

Might be because Rest is some predefined function in JS or SVG or whatever.

nowthis commented 3 years ago

Odd, I wouldn't expect a specific word to cause an issue.

Can you attach the relevant portion of the text from the "Inputs" field?

This input works fine for me, for example:

A1 [100] B
A2 [200] B
B [300] Rest

Is it possible that 'Rest' is a name used already by another node earlier in the diagram?

(SankeyMATIC doesn't handle 'cycles' well currently, and trying to connect an later flow to an earlier node will definitely produce strange output.)

Euramsia commented 3 years ago

Oh, yea, my bad. I checked and I used Rest twice, that's why it looked so twisted. Poor code went out of its way to make it work. Sorry for the disturbance.

nowthis commented 3 years ago

@Euramsia Not a problem. I think the tool could do a better job of alerting someone when that's happening. Thanks for reminding me about it.