Show / Hide Table of Contents

Getting Started

Information!
Adding FlowChart JS to your project is very simple, it will only take you few minutes, then your users will be able to create flow charts in seconds.

System requirements

  • FlowChart JS runs on any server that supports HTML. You can even run BALKAN FlowChart JS locally from a filesystem.
  • FlowChart JS does not depend on any third party JavaScript library
  • FlowChart JS works in all modern browsers and uses SVG for the graphics rendering

Installation

  1. Download BALKAN FlowChart JS file form here.
  2. Unzip the file and add it to you root directory.
  3. In your html document between the head tags include the code bellow, and then FlowChart JS will be installed.
     
                
    <script src="www.[yourdomain].com/FlowChart.js"></script>
                

Your first BALKAN FlowChart JS project

With BALKAN FlowChart JS included in your webpage you are ready to create your first FlowChart JS.

  1. Add a div in your webpage. Give it an id and set a specific width and height which will be the width and height of your FlowChart JS.
                                                                                                                              
    <style>
        html, body, #chart{
            width: 100%;
            height: 100%;
            margin: 0;
        }
    </style>
    <div id="chart"></div>
    
  2. Add script tags anywhere in a webpage, containing the following code:
        
                
    
    <script>
    let chart = new FlowChart('#chart');
    chart.onChanged(function(){
        var data = chart.json();
        //post data to server
    });
    chart.load({
            nodes: [
                { id: 1, templateId: 'process', x: 400, y: 150, fill: "#FFCA28" },
                { id: 2, templateId: 'decision', x: 400, y: 350, fill: "#F57C00" },
                { id: 3, templateId: 'process', x: 700, y: 350 }
            ],
            links: [
                { from: 1, to: 2 },
                { from: 2, to: 3 }
            ]
        }
    ); 
    </script> 
                
  3. You should now see the following FlowChart JS on your webpage:

Components

Below are the FlowChart JS components and how you can access them through the API:


TypeScript Declaration File

The download package includes .d.ts file.
If you don't use any frameworks, in order to have intellisense for your .js file in Visual Studio Code, you need to inclide this refference in the top of the file:


        
/// <reference path="FlowChart.d.ts" />

Update the database

Use onChanged method to save changes in the database.

Here we have an example on how to update the database. For more details, see our Server Side examples doc page.

License

We believe in a simple, transparent and flexible licensing and pricing model that is aligned with the business value BALKAN App delivers to you. All licenses include one year of maintenance and technical support and are available on perpetual base.