flowchart.js
flowchart.js copied to clipboard
Can a decision has 3 options
It seems just yes/no decision, is it possible a one/two/three decision?
unfortunately no...
how to support more than two decision? now it is only yes and no
Enhancing flowchart.js to support N options from a conditional would make this useable in a much greater number of instances. As it is now, the limit to 2 branches per condition makes it unsuitable for any project I have ever worked on.
Is there an outline of a plan for adding more branches to a condition that someone could pick up and complete, then submit a pull request for?
You are more than welcome to provide a pull request. An interesting challenge to solve is the visual. A decision is a diamond, one point is entry, so you might have 3 points for exit and you have the challenge of visualizing. Any switch statement at the end is a series of yes/no statements, so you can already render any workflow with it.
@dholcombe I have cases for "more than yes / no" and I've simply used multiple decision to decide if this is option 1, option 2, option 3, etc it makes a bigger tree but there isn't anything I don't think can be shown... obviously if you have something really really complicated then you'd need something equally more complex
Hello. Any implementation was added to the master? I need to add multiple decisions too. I haven't enough time to update it, however I would like to share a solution basically like following:
c2=>condition: Good idea|rejected
c2(true)->io->e
c2(false)->e
c2=>condition: Good idea|approved
c2(false)->st
Shortly, if we have a component defined same name before, the library can make same location of the copied second (if you like fourth) component and the oldest one. To use this structure, it can be allowed to define variables with same component type, if types will be changed, components except for firstly defined must be rejected.