Download the PHP package yacoubalhaidari/organization-chart without Composer

On this page you can find all versions of the php package yacoubalhaidari/organization-chart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package organization-chart

Filament Organization Chart Widget

organization-chart

Latest Version on Packagist Total Downloads License

A powerful and elegant Filament widget plugin for creating interactive organizational charts. Built on top of Highcharts, this package provides a fluent API for visualizing your company's hierarchy with style.

Organization Chart Demo

✨ Features


📋 Table of Contents


🔧 Requirements


📦 Installation

Step 1: Install via Composer

Step 2: Publish Assets

The package assets are automatically published during installation. If needed, you can republish them:

Step 3: Create Your First Widget

Use the artisan command to scaffold a new organization chart widget:

This creates a ready-to-use widget at app/Filament/Widgets/CompanyOrgChartWidget.php.

Step 4: Register the Widget

Add the widget to your Filament Panel Provider (e.g., app/Providers/Filament/AdminPanelProvider.php):

That's it! 🎉 Visit your Filament dashboard to see your organization chart.


🚀 Quick Start

Using the Artisan Command (Recommended)

Generate a widget with pre-configured examples:

This creates a widget with:

Manual Widget Creation

Alternatively, create a widget manually:


💡 Usage Examples

Example 1: Simple Hierarchy

Example 2: Multi-Level Organization

Example 3: Database Integration

Example 4: Horizontal Layout


📚 API Reference

Artisan Commands

Command Description Example
make:organization-chart Generate a new widget php artisan make:organization-chart CompanyChart

Command Usage:

Builder Methods

Configuration Methods

Method Parameters Default Description
title() string $title 'Organization Chart' Set chart title
height() int $pixels 700 Set height in pixels
inverted() bool $inverted true Vertical (true) or horizontal (false)

Example:

Hierarchy Definition Methods

Method Description Returns
executiveLevel(array $relationships) Define top-level relationships self
departments(array $relationships) Define department relationships self
teams(array $relationships) Define team relationships self

Relationship Format: [['parentId', 'childId'], ...]

Example:

Node Definition Methods

Method Description Level
executiveNodes(array $nodes) Define executive details Executive
departmentNodes(array $nodes) Define department details Department
teamNodes(array $nodes) Define team details Team
nodes(array $nodes) Define all nodes at once All

Node Properties:

Property Type Required Description Example
id string ✅ Yes Unique identifier 'CEO'
name string ✅ Yes Display name 'John Smith'
title string No Job title 'Chief Executive Officer'
image string No Profile photo URL 'https://example.com/photo.jpg'
color string No Hex color '#3b82f6'
column int No Column position 0, 1, 2

Example:

Validation Methods

Method Returns Description
validate() array Check for errors
getMissingNodes() array Get missing node IDs
getAllRequiredIds() array Get all required IDs
getSummary() array Get statistics

Example:


🎨 Customization

Widget Views

Use the alternative view without description:

Custom Colors

Profile Images

Translations

Publish and customize translation files:

Edit in:

Widget Column Span

Control widget width:


🛠️ Building from Source

If you're contributing or want to build assets from source:

Prerequisites

Build Steps

Build Commands

Command Description
npm run build Build CSS and JS for production
npm run build:css Build CSS only
npm run build:js Build JS only
npm run dev Same as build (no watch mode)

After Building

Publish the updated assets to your Filament application:

Project Structure


🐛 Troubleshooting

Chart Not Displaying

Problem: Widget shows but chart is blank.

Solutions:

  1. Clear cache: php artisan optimize:clear
  2. Republish assets: php artisan filament:assets
  3. Check browser console for JavaScript errors
  4. Verify Highcharts is loaded

Missing Nodes Error

Problem: Relationships reference undefined IDs.

Solution: Use validation to find issues:

Assets Not Loading

Problem: Styles or JavaScript not working.

Solutions:

  1. Re-publish: php artisan filament:assets --force
  2. Clear browser cache (Ctrl+F5)
  3. Check public directory permissions
  4. Verify assets exist in public/js/yacoubalhaidari/ and public/css/yacoubalhaidari/

🤝 Contributing

Contributions are welcome! Here's how you can help:

Development Setup

  1. Fork the repository
  2. Clone your fork
  3. Install dependencies: composer install && npm install
  4. Make your changes
  5. Build assets: npm run build
  6. Test your changes
  7. Submit a pull request

Guidelines

Reporting Issues

Please open an issue on GitHub with:


📄 License

This package is open-sourced software licensed under the MIT License.


👤 Author

Yacoub Al-haidari


🙏 Credits

Built With:


🔗 Links


⭐ Support

If you find this package helpful, please consider:


Made with ❤️ for the Filament community


All versions of organization-chart with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0|^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yacoubalhaidari/organization-chart contains the following files

Loading the files please wait ...