Object Based Flow Charts(obfc): Draws SVG-based flow charts by creating objects in your web pages.
Object Based Flow Charts(obfc): Draws SVG-based flow charts by creating objects in your web pages.
obfc.js is an object-based JavaScript Library for drawing SVG flow charts acroos modern web browsers. It makes easily to construct objects, links and connections. Moreover, it dispatches a click event when an object or a line is clicked and descriptions can be added for all clicks.
obfc.js has 24 different SVG shapes that can be divided into four groups:
To use obfc.js the following:
<script src="obfc.js"></script>
and then add svg element to body of a web page.
<svg id="demo" width="600" height="700"> </svg>
and then connect library to the id of the SVG element.
<script>
prepare_SVG("demo");
</script>
To draw objects, add_theObject function can be used for the given SVG element.
<script>
var object1 = add_theObject(new Terminal(300, 50, 1, "Hello obfc.js", 20, "<h3>Description in HTML format</h3>"));
var object2 = add_theObject(new Process(300, 150, 1, ["Line 1", "Line 2"], 10));
</script>
add_theObject is a function that adds the object into a given SVG element and returns this object. This returned object is used for drawing lines between two objects. There are 24 different SVG objects in obfc.js. 22 of them contain 9 parameters for creating an object. First two parameters are required, others are optimal.
Object_Name(_middle_x, _middle_y, _size, _text, _text_size, _description, _fill_color, _stroke_color, _text_color);
After creating all objects, objects can be linked by using draw_theLine function.
<script>
var o_line1 = draw_theLine(new Line(object1, object2, 1, 0, "Text", 12, "<b>Description in HTML format</b>"));
</script>
Line is a function that determines the path for given two objects and their positions. This function has 9 parameters. First two parameter is required and others are optimal.
Line(object1, object2, position1, position2, _text, _text_size, _description, _stroke_color, _text_color)
(ver 1.2.)
Click for more information.
Object-based flowchart drawing library. Uzun, E.; and Buluş, H., N. In 2017 International Conference on Computer Science and Engineering (UBMK), pages 110-115, 2017.
Object-based Entity Relationship Diagram Drawing Library: EntRel.JS. Uzun, E.; Yerlikaya, T.; and Kırat, O. In 7th International Scientific Conference “TechSys 2018” – Engineering, Technologies and Systems, Technical University of Sofia, Plovdiv Branch May 17-19, pages 114-119, 2018.
Click for bibtex, downloads, all publications…
Copyright (c) 2017 Erdinç Uzun
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.