Building an Org Chart MVP

Building an Org Chart MVP

Building an Org Chart MVP: Building an Org Chart MVP with Balkan OrgChart JS

Building an Org Chart MVP with Balkan OrgChart JS

Creating a clean, interactive organizational chart doesnโ€™t require months of development. In this post, Iโ€™ll walk through how we built an MVP (Minimum Viable Product) for an org chart using Balkan OrgChart JS โ€” a feature-rich JavaScript library that's easy to integrate and extend.

Full code example

๐ŸŽฏ Goals of the Org Chart MVP

The goal of our MVP is to create a functional and interactive org chart that covers core use cases like:

  • Visualizing a team hierarchy

  • Searching and highlighting people

  • Drag-and-drop reordering

  • Basic node management (Add/Edit/Remove)

  • Exporting the chart to various formats (PDF, PNG, CSV, etc.)

We focused on building something that works and adds value right away โ€” without waiting for full-blown features like role-based permissions or live database sync.


๐Ÿ’ก Features We Included

Hereโ€™s what our Org Chart MVP includes out of the box:

โœ… Visual Hierarchy

  • Based on parent-child (pid) relationships

  • Supports images, names, and titles

๐Ÿ” Search & Highlight

  • Users can search for a person by name or title

  • The selected node is highlighted in orange

๐Ÿ“ฆ Node Actions

  • Built-in menu to add, edit, view details, or remove a node

๐Ÿ–ฑ Drag-and-Drop

  • Rearranging the structure by dragging nodes between managers

๐Ÿ“ค Export Options

  • PDF, PNG, SVG, CSV, and PowerPoint export via menu

๐ŸŒ‘ Dark Mode UI

  • We use the dark mode combined with the olivia template for a sleek look

๐Ÿงฑ Code Overview

1. HTML Setup

<script src="https://balkan.app/js/OrgChart.js"></script>
<div id="tree"></div>

2. JavaScript Logic

let chart = new OrgChart(document.getElementById("tree"), {
    enableDragDrop: true,
    filterBy: ["title"],
    template: 'olivia',
    mode: 'dark',
    menu: {
        pdf: { text: "Export PDF" },
        png: { text: "Export PNG" },
        svg: { text: "Export SVG" },
        csv: { text: "Export CSV" },
        pppreview: { text: "Create PowerPoint Presentation" },
        powerpoint: { text: "Export to PowerPoint" }
    },
    nodeMenu: {
        details: { text: "Details" },
        edit: { text: "Edit" },
        add: { text: "Add" },
        remove: { text: "Remove" }
    },
    nodeBinding: {
        field_0: "name",
        field_1: "title",
        img_0: "img"
    }
});

3. Search & Highlight Behavior

chart.searchUI.on('searchclick', function (sender, args) {
    // Reset previous highlight
    if (highlightedId != 0) {
        let oldNode = chart.get(highlightedId);
        if (oldNode.tags) oldNode.tags.pop("match");
        chart.updateNode(oldNode);
    }

    // Highlight selected node
    highlightedId = args.nodeId;
    let node = chart.get(args.nodeId);
    node.tags = node.tags || [];
    node.tags.push("match");
    chart.updateNode(node);
});

4. Loading Chart Data

chart.load([
    { id: "1", name: "Jack Hill", title: "Chairman and CEO", img: "https://cdn.balkan.app/shared/1.jpg" },
    { id: "2", pid: "1", name: "Lexie Cole", title: "QA Lead", img: "https://cdn.balkan.app/shared/2.jpg" },
    { id: "3", pid: "1", name: "Janae Barrett", title: "Technical Director", img: "https://cdn.balkan.app/shared/3.jpg" },
    // more nodes...
]);

5. Basic Styling

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: Helvetica;
}
#tree {
  width: 100%;
  height: 100%;
}
.match rect {
  fill: #F57C00 !important; /* Highlight searched node */
}


โœ… Why This MVP Works

This MVP provides immediate value:

  • Itโ€™s easy to understand and navigate

  • Can be embedded on internal company portals or HR dashboards

  • Gives users the ability to explore org structures and export data without a backend

Itโ€™s a great starting point to later expand with features like:

  • Database integration

  • Access control by user roles

  • Custom analytics on team size, structure, etc.


๐Ÿš€ Final Thoughts

You donโ€™t need to overengineer the first version of your org chart. Start with what users actually need โ€” visualization, search, and basic interaction โ€” and iterate from there.

The Balkan OrgChart JS library makes it fast to go from idea to MVP in just a few hours.

OrgChart MVP - OrgChart JS

Introducing PowerPoint Preview in OrgChart JS

Change The Order in the OrgChart by Drag and Drop (Simple Example)

Highlight to the root on search in OrgChart JS

OrgChart JS Now Supports Export to PowerPoint

OrgChart JS Now Supports Export to PowerPoint

Dynamically changing an orgchart field

Project Timeline Chart

OrgChart Conditional Node Size

Add CSS on Export in OrgChart JS

OrgChart JS Angular Templates

Org Chart Web App with Node.js and Express

Loading on Demand with Family Tree JS 2

Dynamic Colors Organizational Chart

Charlie Chaplin Family Tree

Introducing Family Tree JS 2: The Next Generation is Here!

React OrgChart

Create and run an OrgChart Single Page Application with Node.js – beginner's guide.

Export and Import Org Chart to Excel

Adding Custom HTML Elements into OrgChart JS container

Еasily Create a Template in an OrgChart

Node Swapping in an Organizational Chart

Vladimir Putin Family Tree

Add Field Data in Expand button with OrgChart JS

Bill Gates Family Tree

Create a Tooltip for a ForeignObject Element Hover in OrgChart JS

Custom Aligning Nodes in a JavaScript Organizational Chart

Center and Zoom on Search Click in OrgChart JS

Create Multiline Group Titles in OrgChart JS

Adding Arrows in OrgChart JS Links

Show a Custom Edit Form for a node in OrgChart JS

Jeff Bezos Family Tree

How to Add Material Icons in OrgChart JS

Leonardo DiCaprio Family Tree

Visualizing Dual Reporting Structures with OrgChart JS

Exporting OrgChart JS to A4 PDF: A Step-by-Step Guide

Genghis Khan Family Tree: The Lineage of the Great Khan

OrgChart JS now support Export to Visio

New Export Option: childLevels in OrgChart JS

Elon Musk Family Tree

AI for OrgChart JS: Revolutionizing Organization Charts

Family Tree JS 2 (Preview)

d3 org chart

Our Family Tree App is Now on Android!

Why BALKAN OrgChart JS is the Best Organizational Chart Library

How to Create a JavaScript Flow Chart

How to Add an Organizational Chart to a Mobile Application

How to Create a JavaScript Organizational Chart

OrgChart JS Now Supports PDF Export Per Team

Introducing Family Tree App

Donald Trump Family Tree

Discover Your Roots: Build Your Family Tree with BALKAN App

JavaScript Organization Chart

Instantly create interactive, intuitive flowcharts in seconds

JavaScript Hierarchy Chart

Mermaid js alternative

Create Flowcharts in Seconds with Flow Chart JS: Your New Favorite JavaScript Library

Customizing Filter UI - Code of The Week

Zoom Slider - Code of The Week

Bookmarks - Code of The Week

Customizing Search Results - Code of The Week

Introducing Undo Redo - Code Of The Week

Price adjustment announcement

The price will increase for new customers

Buttons for adding family members to a family tree - Code of The Week

Levels - Code of The Week

Change node color from a button in the Edit Form - Code of The Week

Filter and Highlight Nodes - Code of The Week

Up Expanding - Code Of The Week

Programmatically move the chart - Code of The Week

Siblings in Family Tree JS - Code of The Week

Purple template - Code of The Week

Assistant With Children - Code of The Week

Conditional Layout - Code of The Week

Conditional Color - Code of the Week

Sriniz Family Tree Template - Code of The Week

Color Picker - Code of The Week

Add company logo as watermark in exported PDF documents - Code of The Week

Mind map - Code of The Week

Create relationship with circle menu - Code of The Week

Animated Photos - Code of the Week

Grouped Dotted Lines - Code Of The Week

Dotted Lines - Code Of The Week

Department Dynamic Title - Code Of The Week

Add expand button for partners - Code of the Week

Change the sub levels with Drag and Drop - Code of The Week

Custom Edit From using Popover - Code of the Week

Sub levels tag option - Code of the Week

Highlights search results directly on Org Chart nodes - Code of the Week

Code of the Week/Relationship maps and Business process diagrams

Search using field name abbreviations - Code of the Week

Dynamic Template - Code of the Week

Read and Write local CSV file using File API and Org Chart JS - Code of The Week

Organizational Chart Path Highlighting and Selection

Modern Template - Org Chart JS

Performance - Org Chart JS

Single parent is supported in Family Tree JS

How To Develop a Flowchart Maker with Org Chart JS

How to upload a photo to Family Tree JS in .NET core

How to change the color of selected node - Family Tree JS

Family Tree with live tiles

Error

BALKAN Blog

The Latest BALKAN App News and Releases. Latest information on Org Chart JS and Family Tree JS.