Comments (22)
Hi xiaodaigh,
I am also getting same error. Can you please tell me how you resolved that issue?
Thanks!
from flowchart.js.
@sumitraghav Do you use the latest version?
from flowchart.js.
Hi adrai,
Thanks for the reply
Yeh I am using the latest version that is flowchart-1.2.4.js
I found the error , actually i miss the \n after cond step "'or No?\n:>http://www.google.com\n' + " so it was not reading io step.
now it is working fine.
But now the problem is, it is not redirecting to the given url.
Like you did , when click on start, it redirect to google.com.
How could I do this.
Thanks
from flowchart.js.
Is the \n after www.google.com really needed? I think this is the problem...
from flowchart.js.
YEH,
when i add \n after the link, my problem resolved. I guess chart object read all the lines and and if in do not use \n it doesn't read io step as it doesn't found it in new line.
May be my assumption but my problem is resolved when i did this. I found this by debugging the flowchart javascript .
Now my question is
it is not redirecting to the given url.
Like you did , when click on start, it redirect to google.com.
How could I do this.
from flowchart.js.
Can you paste me your whole example "code" (description of flowchart)?
from flowchart.js.
I am using this code
<script> window.onload = function () { var diagram = flowchart.parse('st=>start: Start:>http://www.google.com[blank]\n' + 'e=>end:>http://www.google.com\n' + 'op1=>operation: My Operation1\n' + 'sub1=>subroutine: My Subroutine1\n' + 'cond1=>condition: Yes \n' + 'or No 1?\n:>http://www.google.com\n' + 'op2=>operation: My Operation2\n' + 'sub2=>subroutine: My Subroutine2\n' + 'cond2=>condition: Yes \n' + 'or No 2?\n:>http://www.google.com\n' + 'io=>inputoutput: catch something...\n' + '' + 'st->op1->cond1\n' + 'cond1(yes, right)->op2->cond2\n' + 'cond1(no)->op1\n' + 'cond2(yes, right)->io->e\n' + // conditions can also be redirected like cond(yes, bottom) or cond(yes, right) 'cond2(no)->op2'); diagram.drawSVG('diagram'); // you can also try to pass options: diagram.drawSVG('diagram', { 'line-width': 3, 'line-length': 50, 'text-margin': 10, 'font-size': 14, 'font-color': 'black', 'line-color': 'black', 'element-color': 'black', 'fill': 'white', 'yes-text': 'yes', 'no-text': 'no', 'arrow-end': 'block' }); }; </script>And i include raphael.js and flowchart.js both latest.
from flowchart.js.
this? ;-)
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...
st->op1->cond
cond(yes)->io->e
cond(no)->sub1->op1
from flowchart.js.
how could i post the code?
from flowchart.js.
Yeh I am trying this one exactly in one one my code
from flowchart.js.
that is my code in other example.
window.onload = function () {
var diagram = flowchart.parse('st=>start: Start:>http://www.google.com[blank]\n' +
'e=>end:>http://www.google.com\n' +
'op1=>operation: My Operation1\n' +
'sub1=>subroutine: My Subroutine1\n' +
'cond1=>condition: Yes \n' +
'or No 1?\n:>http://www.google.com\n' +
'op2=>operation: My Operation2\n' +
'sub2=>subroutine: My Subroutine2\n' +
'cond2=>condition: Yes \n' +
'or No 2?\n:>http://www.google.com\n' +
'io=>inputoutput: catch something...\n' +
'' +
'st->op1->cond1\n' +
'cond1(yes, right)->op2->cond2\n' +
'cond1(no)->op1\n' +
'cond2(yes, right)->io->e\n' + // conditions can also be redirected like cond(yes, bottom) or cond(yes, right)
'cond2(no)->op2');
diagram.drawSVG('diagram');
// you can also try to pass options:
diagram.drawSVG('diagram', {
'line-width': 3,
'line-length': 50,
'text-margin': 10,
'font-size': 14,
'font-color': 'black',
'line-color': 'black',
'element-color': 'black',
'fill': 'white',
'yes-text': 'yes',
'no-text': 'no',
'arrow-end': 'block'
});
};
from flowchart.js.
ok, seams to be a bug in raphael... DmitryBaranovskiy/raphael#784
from flowchart.js.
Can u plz tell me.. how could I resolve this.
In the link u gave, they are using different format and different object i guess.
Can u plz give me the suitable code.
from flowchart.js.
At the moment you need an older version of raphael or simply wait until the new raphael version is released.
from flowchart.js.
thanks a lott adrai,
will try that option.... can u plz give me the link for older version . Because there is only latest version is available on the website i think.
from flowchart.js.
http://adrai.github.io/flowchart.js/raphael-min.js ;-)
from flowchart.js.
It is working now.
Thanks
One more thing . Can we pass data through JSON format into diagram.parse("");
Is there any particular format that we only pass set of rules, steps and redirection method/url or we need to form the string only?
from flowchart.js.
At the moment it's the string only, but pull requests are welcome!
from flowchart.js.
Ohh cool,
Can we pass String through JSON ??
from flowchart.js.
What do you mean with String through JSON? Can you make an example?
from flowchart.js.
Actually I want the thing that I ask you b4. But now I ll work llok into string format.
Left potion is not working in it. See when I define left direction in condition(cond(Yes, Left)->nxt op), no change in drawing format.
Can we change it according to our need. For example I want to draw it in center position and draggable.
I want something like this
http://raphaeljs.com/graffle.html
Thanks!
from flowchart.js.
short feedback:
- the direction works only for bottom and right (left and top not supported)
- I have not so much time at the moment to make bigger extensions(refactorings) for this library, but if you want you can do a pull request and I will review it, ok?
from flowchart.js.
Related Issues (20)
- Three parallel lines from start HOT 8
- How can I create below structure? HOT 3
- [Question] How to make two nodes output to the same node? HOT 3
- Not getting the error in code. HOT 10
- Left path not working in parallel. HOT 3
- Open modal popup when clicked on node. HOT 1
- Link not working HOT 5
- Igor? HOT 4
- How do I control the arrow length? HOT 3
- Flow chart scaling and alignment issues HOT 7
- code2flow seems to be more convenient,Whether you have considered changing the syntax like this? HOT 3
- [help] how can i use this lib HOT 1
- I used your example/index.html in pyflowchart
- [Python] Add support for classes HOT 3
- how to use this in typescript? HOT 4
- How to Add Text Direction
- Incorrect element offset HOT 1
- Could you add input, output type? HOT 1
- Items piling on top of each other ?
- Where did box 5 go? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowchart.js.