# @digdir/organisation-chart

> Organisation chart generator

Latest version **0.4.2** (published 2024-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @digdir/organisation-chart
pnpm add @digdir/organisation-chart
yarn add @digdir/organisation-chart
bun add @digdir/organisation-chart
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.2 |
| Published | 2024-05-03 |
| First published | 2024-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 485.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | oyvindthune, barsnes, jensmo |
| Keywords | orgchart, organisation, chart, digdir |

## Links

- npm: https://www.npmjs.com/package/@digdir/organisation-chart
- Repository: https://github.com/felleslosninger/tlp-organisation-chart
- Homepage: https://orgchart.digdir.no/
- Issues: https://github.com/felleslosninger/tlp-organisation-chart/issues
- npm.io page: https://npm.io/package/@digdir/organisation-chart

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.4.2 (latest) — 2024-05-03
- 0.4.1 — 2024-03-26
- 0.4.0 — 2024-03-26
- 0.3.0 — 2024-03-20
- 0.2.1 — 2024-03-14
- 0.2.0 — 2024-03-08

## README

# Organisation Chart

[![](https://img.shields.io/npm/v/@digdir/organisation-chart?label=latest%20release&color=0051be)](https://www.npmjs.com/package/@digdir/organisation-chart)

Display an accessible organisation chart.

![Image showing organisation chart](https://i.imgur.com/5IZXdii.png)

---

## 🚀 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

```shell
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.

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

then import the function, and use it

```js
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](https://orgchart.digdir.no) for more information about behaviour and data structure.

---
_Source: https://npm.io/package/@digdir/organisation-chart · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
