@digdir/organisation-chart
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

Organisation Chart

Display an accessible organisation chart.

Image showing organisation chart


🚀 Get started

The package exposes one javascript function that can be used on any website, or in any framework. Keep in mind that the function always attaches itself to window.

Installing via npm

npm install @digdir/organisation-chart

After the package is installed, we need to import the css, either globally or only on the page you are using the chart.

import '@digdir/organisation-chart/dist/index.css';

then import the function, and use it

import { generateOrgChart } from '@digdir/organisation-chart';

generateOrgChart(data, 'chart');

The first argument is your JSON data, read more about setting up your data below. The second argument is the id of the container where you want the chart to show.


Please read the documentation on orgchart.digdir.no for more information about behaviour and data structure.

Package Sidebar

Install

npm i @digdir/organisation-chart

Weekly Downloads

9

Version

0.4.2

License

MIT

Unpacked Size

497 kB

Total Files

13

Last publish

Collaborators

  • oyvindthune
  • barsnes
  • jensmo