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

Colour change inside a flow chart? #21

Closed
Stwissel opened this issue Jul 21, 2014 · 5 comments
Closed

Colour change inside a flow chart? #21

Stwissel opened this issue Jul 21, 2014 · 5 comments

Comments

@Stwissel
Copy link
Contributor

Improvement request:
Ability to change the colour of following elements inside the flow.

Use case:
Draw the flow chart for a current instance of a workflow. Have 3 colors:

  • Past steps
  • current step(s)
  • future steps
@adrai
Copy link
Owner

adrai commented Jul 21, 2014

You can try to do this via jquery...
Flowchart.js has no idea what is past and future...

@Stwissel
Copy link
Contributor Author

I was thinking of something like:

      st->op1(color:#FF0000 background-color:#00FF00)->cond

or (better):

     op1=>operation(color:#FF0000 background-color:#00FF00): My Operation

@adrai
Copy link
Owner

adrai commented Jul 21, 2014

I would really recommend to use jquery for that... there shouldn't be too much "styling infos"

$('#op1').attr('fill', '#00FF00');

$('#op1').attr('stroke', '#FF0000');

@Stwissel
Copy link
Contributor Author

I was thinking of something like:

      st->op1(color:#FF0000 background-color:#00FF00)->cond

or (better):

     op1=>operation(color:#FF0000 background-color:#00FF00): My Operation

@Stwissel
Copy link
Contributor Author

The jQuery makes sense, sorry that I didn't think about it.
I was musing adding a "color change" item to operation, condition, io, start, stop...
This way I could derive the change point from data without contemplating about how to implement. Something like:

     st=>start: Start:>http://www.google.com[blank]
     e=>end:>http://www.google.com
     op1=>operation: My Operation
     sub1=>subroutine: My Subroutine
     cond=>condition: Yes or No?:>http://www.google.com
     io=>inputoutput: catch something...
     curr=>color: foreground:#FF0000 background:#FFDDDD
     future=>color: foreground: #333399 background:#CCCCFF
     deadend=>color: foreground:#CCCCCC background:#888888

     st->op1->cond
     cond(yes)->curr->io-future->e
     cond(no)->deadend->sub1(right)->op1

Or...

    io(class=future)=>operation
    cond(class=current)=>condition
    op3(class=deadend)=>operation

You then would only need to generate the class attribute and let the CSS handle the rest.
Eventually even skip the class= and only write op3(deadend)

But I will go with the jquery for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants