Senin, 03 Maret 2025

FlowchartJS Sample

1. Type this following web source code in website editor:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>flowchart.js · Playground</title>
<style type="text/css">
.end-element { fill : #FFCCFF; }
</style>
<!-- raphael/2.3.0 -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js"></script>
<!-- jquery/1.11.0 -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- flowchart/1.18.0 -->
<script src="http://flowchart.js.org/flowchart-latest.js"></script>
<script>
window.onload = function () {
var btn = document.getElementById("run"),
cd = document.getElementById("code"),
chart;

(btn.onclick = function () {
var code = cd.value;

if (chart) {
  chart.clean();
}

chart = flowchart.parse(code);
chart.drawSVG('canvas');

$('[id^=sub1]').click(function(){
  alert('info here');
});
})();

};

function myFunction(event, node) {
console.log("You just clicked this node:", node);
}
</script>
</head>
<body>
<div><textarea id="code" style="width: 100%;" rows="11">st=>start: Start|past
en=>end: End
op1=>operation: Lamp Doesn't Work|past
op2=>operation: Plug In Lamp|current
op3=>operation: Replace Bulb|current
op4=>operation: Buy New Lamp|current
cond1=>condition: Lamp 
Pluged In?|approved
cond2=>condition: Bulb Burned Out?|rejected

st->op1->cond1
cond1(yes)->cond2
cond1(no)->op2->en
cond2(true)->op3->en
cond2(false)->op4(right)->en

st@>op1({"stroke":"black","stroke-width":6,"arrow-end":"classic-wide-long"})@>cond1({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})@>cond2({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})@>op2({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})@>en({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})
cond1@>op2({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})
cond2@>op3({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})@>en({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})
cond2@>op4({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})@>en({"stroke":"Black","stroke-width":6,"arrow-end":"classic-wide-long"})
</textarea></div>
<div><button id="run" type="button">Run</button></div>
<div id="canvas"></div>
</body>
</html>
2. Save file as FlowChartJSSample1.html
3. Open file FlowChartJSSample1.html in Google Chrome browser.


Output



Notes To see the more clear picture, click on the picture.

Related Post

Ordinal Number List

  • An Ordinal Number is a number that tells the position of something in a list, such as 1st, 2nd, 3rd, 4th, 5th etc.
  • An ordinal number is used as a numeral adjective within the parts of speech.
  • An ordinal number is used as a noun within a sentence.

List of Ordinal Numbers

The ordinal numbers from 1st to 100th in English are:
1st – first
2nd – second
3rd – third
4th – fourth
5th – fifth
6th – sixth
7th – seventh
8th – eighth
9th – ninth
10th – tenth
11th – eleventh
12th – twelfth
13th – thirteenth
14th – fourteenth
15th – fifteenth
16th – sixteenth
17th – seventeenth
18th – eighteenth
19th – nineteenth
20th – twentieth
21st – twenty-first
22nd – twenty-second
23rd – twenty-third
24th – twenty-fourth
25th – twenty-fifth
26th – twenty-sixth
27th – twenty-seventh
28th – twenty-eighth
29th – twenty-ninth
30th – thirtieth
31st – thirty-first
...
40th – fourtieth
50th – Fiftieth
60th – Sixtieth
70th – Seventieth
80th – Eightieth
90th – Ninetieth
100th – Hundredth

Bibliography

https://headsupenglish.com/
https://www.mathsisfun.com/
https://www.stylemanual.gov.au/
https://www.woodwardenglish.com/

Related Post

Flowchart JS Symbols List

Node Syntax

nodeName=>nodeType: nodeText[|flowstate][:>urlLink]

Items in [] are optional.

nodeName defines the nodes variable name within the flowchart document.

nodeType defines what type the node is. See "Node Types" for more information.

nodeText is the text that will be inserted into the node. Newlines are allowed and will be reflected in the rendered node text.

flowstate is optional and uses the | operator that specifies extra styling for the node.

urlLink is optional and uses the :> operator to specify the url to link to.

Node Types

Node Types consist of start, end, operation, inputoutput, input, output, subroutine, condition, parallel. Defines the shape that the node will take:

start node
Used as the first node ( terminal node ) where flows start from. Default text is Start. ( Oval Shape or Pill Shape or Ellipse Shape ).

st=>start: start

end node
Used as the last node ( terminal node ) where a flow ends. Default text is End. ( Oval Shape or Pill Shape or Ellipse Shape ).

e=>end

operation node
Indicates that an operation needs to happen in the flow. ( Rectangle Shape )

op1=>operation: Operation

inputoutput node
Indicates that IO data happens in a flow. ( Parallelogram Shape )

io=>inputoutput: input and output

input node
Indicates that Input happens in a flow. ( Inverted or Upside Down Trapezium Shape or Trapezoid Shape )

inp1=>input: Input info

output node
Indicates that Output happens in a flow. ( Upright Trapezium Shape or Trapezoid Shape )

out1=>output: Print info

subroutine node
Indicates that a Subroutine or Predefined Process happens in the flow and that there should be another flowchart that documents this subroutine. ( A Rectangle With Two Lines On The Height Side Shape / A Rectangles With Double-Struck Vertical Edges Shape )

sub1=>subroutine: subroutine

condition node
Allows for a conditional or logical statement to direct the flow into one of two paths. ( Diamond Shape or Rhombus Shape )

cond=>condition: condition
Yes or No?

parallel node
Allows for multiple flows to happen simultaneously. ( The Two Horizontal Lines At The Beginning Or Ending Shape / Two Parallel Horizontal Bar Shape )

para=>parallel: parallel

Connections Operator  / Branches Operator / Directional Flow Operator

Connections are defined in their own section below the node definitions. The dash and greater than -> operator specifies a connection from one node to another like nodeVar1->nodeVar2->nodeVar3.

Not all nodes need to be specified in one string and can be separated like so

nodeVar1->nodeVar2
nodeVar2->nodeVar3

Connection syntax of Connections is as follows:


Items in [] are optional.

Directions Specifier

The following directions are available and define the direction of the connection that will leave the node off. If there are more than one specifiers, it is always the last. All nodes have a default direction making this an optional specification. The <direction> specifier will be used to indicate that one of the following should be used in its place.
  • left
  • right
  • top
  • bottom

Node Specific Specifiers by Type

Each node variables has optional specifiers, like direction, and some have special specifiers depending on the node type that are defined below. Specifiers are added after the variable name in parentheses () and separated with comma , like nodeVar(spec1, spec2).

start node specifier
Optional direction
startVar(<direction>)->nextNode

end node specifier
No specifications because connections only go to the end node and do not leave from it.
previousNode->endVar

operation node specifier
Optional direction
operationVar(<direction>)->nextNode

inputoutput node specifier
Optional direction
inputoutputVar(<direction>)->nextNode

subroutine node specifier
Optional direction
subroutineVar(<direction>)->nextNode

condition node specifier
Required logical specification of yes or no
Optional direction

conditionalVar(yes, <direction>)->nextNode1
conditionalVar(no,  <direction>)->nextNode2

parallel node specifier
Required path specification of path1, path2, or path3
Optional direction

parallelVar(path1, <direction>)->nextNode1
parallelVar(path2, <direction>)->nextNode2
parallelVar(path3, <direction>)->nextNode3

Links

A external link can be added to a node with the :> operator.

The st node is linked to http://www.google.com and will open a new tab because [blank] is at the end of the URL.

The e node is linked to http://www.yahoo.com and will cause the page to navigate to that page instead of opening a new tab.

st=>start: Start:>http://www.google.com[blank]
e=>end: End:>http://www.yahoo.com

Names for Connections Operator / Custom Labels for Branches Operator

Connection syntax with Custom Labels for Branches operator or Names for Connections Operator is as follows:


Items in [] are optional.

Example

cond(false@polynomial)->sub1(right)

Full Example

st=>start: Start:>http://www.google.com[blank]
e=>end:>http://www.google.com
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: linear or polynomial :>http://www.google.com
io=>inputoutput: catch something...
para=>parallel: 3 possibilities

st->op1->cond
cond(true@linear)->io->e
cond(false@polynomial)->sub1(right)
sub1(right)->para
para(path1@an1, top)->cond
para(path2@an2, right)->op1
para(path3@an3, bottom)->e

< Previous  Flowchart Symbol List

< to learn Flowchart Shapes, click Flowchart Symbol List ( Flowchart Shapes )

Bibliography

http://flowchart.js.org/
https://www.drawio.com/
https://www.smartdraw.com/

Related Post

Flowchart Symbol List

The Most Commonly Used Flowchart Symbols / Basic Flowchart Symbols

  • The Start Of Flowchart and The End Of Flowchart ( Terminal Symbol ) or Start Terminator Action and End Terminator Action represents in Oval Shape or Pill Shape or Lozenges Shape.
  • A Process Step / An Action Step / An Operation Step / A Task Step / An Activity Step represents in Rectangle Shape or Box Shape.
  • The Decision Making / Alternate Flow / Branch Flow / Logic Flow / Conditional Statement / “Yes” or “No” or “True” or “False” question represents in Diamond Shape or Rhombus Shape.
  • The Flow Lines / Process’ Direction / Flowchart Path To Connect The Symbols (Blocks Symbol Or Node Symbol) / Sequence Flow represents in Arrow Line Shape.
  • Cross-Functional Flowchart Symbol (Swim Lanes Symbol) : Both Vertical And Horizontal Ways /  Participant's Roles And Responsibilities Shape.

Process / Operation Symbols

  • A Process Step Symbol : Rectangle Shape or Box Shape;
  • Predefined Process Symbol / Sub-Processes (Subroutine in programming flowcharts) Symbol : A Rectangle With Two Lines On The Height Side Shape / A Rectangles With Double-Struck Vertical Edges Shape;
  • Alternate Process Symbol : A Rounded Rectangle Shape / A Rectangle With Rounded Corners Shape;
  • Delay Symbol / Bottleneck Symbol : A Rectangle With Semi-Circle Shape / An Elongated Circle Shape;
  • Preparation Symbol / Initialization Symbol: A Six Point Polygon Shape / A Rectangle With Pointy Bits Shape / A Hexagon Shape;
  • Manual Operation Symbol (Looping Operation in data processing flowcharts) : A Trapezoid With The Longest Parallel Side Upmost Shape / Inverted Trapezoid Shape / Upside Down Trapezoid Shape;
  • Loop Limit Symbol : A Rectangle With Squared-Off Top Edges Shape;

Branching and Control of Flow Symbols / Navigation Symbols

  • Flow Line Symbol (Arrow, Connector) : Arrow Head Line Shape;
  • Terminator Symbol (Terminal Point, Oval) : The Oval Shape / An Elongated Circle / An Ellipse;
  • Decision Symbol : Diamond Shape or Rhombus Shape;
  • Extract Symbol (Measurement) : The Pointed Begin Of The Triangle Shape / The Pointed Up Of The Triangle Shape / Triangle Shape / Upright Triangle Shape;
  • Or Symbol : A Circle With A “Plus Sign / Vertical Cross Sign” Inside It Shape;
  • Summing Junction / Summoning Junction Symbol / Cummulative Operations : A Circle With A "X Sign" Inside It Divided Into Four Slices Shape;
  • Merging & Connecting Symbols
    • On-Page Connector (Inspection) : Small Circle Shape;
    • Off-Page Connector : Five-Pointed Polygon Shape / Pentagon Shape;
    • Merge (Storage in Business Mapping) : The Pointed End Of The Triangle Shape / The Pointed Down Of The Triangle Shape / Inverted Triangle Shape / Upside Down Triangle Shape;
  • Parallel Mode Symbol / Parallel Processing / Concurrent Operation : The Two Horizontal Lines At The Beginning Or Ending Shape / Two Parallel Horizontal Bar Shape;
  • Annotation Symbol / Comment Symbol : An Unclose Adjustable TextBox With Bracket Shape;

Data Symbols, Document Symbols, Input and Output Symbols

  • Data Symbols
    • Punched Card : A Rectangle With One Chamfered Corner Shape;
    • Punched Tape Symbol / Paper Tape Symbol :  A Rectangle Featuring A Rippled Bottom And Top Shape / A Rectangle With A Wavy Line Above and Below It Shape;
  • Document Symbols
    • Document Symbol : A Rectangle Featuring A Rippled Bottom Shape / A Rectangle With A Wavy Line Below It Shape / A Piece Of Torn Paper Shape;
    • Multi-Document Symbol : Multiple Rectangles Featuring A Rippled Bottom Shape / Multiple Rectangles With A Wavy Line Below It Shape / A Stack Of Papers Shape;
  • Input & Output Symbols
    • Data Input Output Symbol (I/O) : A Parallelogram Shape;
    • Display Symbol : An  Elongated Semi-Circle With An Isosceles Triangle On One Side Shape;
    • Manual Input Symbol : A Rectangle With The Top Irregularly Sloping Up From Left To Right / The Trapezoid Shape With A Longer Top Side / Right Angled Trapezium Shape / Right Angled Trapezoid Shape;

File and Information Storage Symbols

  • Stored Data Symbol (Data Storage Symbol) : A Curved Piece Of Paper Shape;
  • Magnetic Disk Symbol (Database) : A Stack Of Cylinders Shape / A Cylinder Shape;
  • Direct Access Storage Symbol (Hard Disk / Hard Drive) : A Cylinder Lying On Its Curved Side Shape;
  • Internal Storage Symbol (RAM) : A Rectangle With Two Lines Going Across Its Length And Width Shape;
  • Sequential Access Storage (Magnetic Tape) : A Reel Of Tape Shape;

Data Processing Symbols

  • Collate Symbol : An Hourglass Shape;
  • Sort Symbol : Two Isosceles Triangles Joined Together On The Longest Side Shape;


to learn Flowchart Shapes, click Flowchart JS Symbols List >

flowchart symbol, flowchart shape, workflow

Bibliography

https://asana.com/
https://clickup.com/
https://creately.com/
https://insidemain.wordpress.com/
https://itbox.id/
https://mockflow.com/
https://nist.gov/
https://venngage.com/
https://www.breezetree.com/
https://www.computersciencecafe.com/
https://www.conceptdraw.com/
https://www.edrawsoft.com/
https://www.gliffy.com/
https://www.rff.com/
https://www.smartdraw.com/
https://www.visual-paradigm.com/
https://www.zenflowchart.com/

Related Post


Minggu, 02 Maret 2025

Draw Ellipse or Oval In Latex

1. type this following Latex code in your Latex editor:
% !TEX TS-program=pdflatex 
% pdflatex drawEllipse1.tex
\documentclass{article}

\usepackage{tikz}
\usepackage[active,tightpage,pdflatex,multi,varwidth]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}

\begin{document}
\begin{tikzpicture}
%% draw a title
\draw(0,0) node{\textbf{Draw Ellipse}};
\draw(0,-25pt) node{\textbf{Using draw}};
\draw(0,-50pt) node {\textbf{circle command}};
\end{tikzpicture}
%% draw a horizontal ellipse / oval shape
\begin{tikzpicture}[very thick]
\draw(0,0) circle[x radius=2, y radius=1];
\end{tikzpicture}
%% draw a vertical ellipse / oval shape ( method 1 )
\begin{tikzpicture}
\draw[very thick](0,0) circle (1cm and 2cm);
\end{tikzpicture}
%% draw a vertical ellipse / oval shape ( method 2 )
\begin{tikzpicture}
\draw[very thick](0,0) ellipse (1cm and 2cm);
\end{tikzpicture}
\end{document}

2. save file as drawEllipse1.tex
3. then build or typeset or compile the Latex code.

Output:



Related Post


Various Other Posts