Organization Chart
The worksheet is the source of truth: people, photos, roles, departments and managers. JointJS lays out the chart from it. Edit a cell and the chart follows; drag a card onto another card to change the manager, and the sheet follows, with undo.
How it works
- The cards are HTML inside SVG
foreignObjectelements, so the photo, the name, the role and the department stripe are plain CSS. - The Photo column is an
imagecolumn, the Department a coloureddropdown, and the Manager adropdownwhose values are the person ids, so renaming someone needs no other change. filterOptionsremoves a person and their reports from the manager choices, andonbeforechangesrefuses a pasted loop.- Dropping a card on another one calls
setValueFromCoords: the change goes through the sheet, so it redraws the chart and undo restores it. - Clicking a card selects the row, and selecting a row highlights the card.
The diagrams use JointJS (MPL 2.0) with its directed graph layout.