ORGANIGRAMME
OrgChart.templates.ana1 = Object.assign({}, OrgChart.templates.ana); OrgChart.templates.ana1.size = [160, 90]; OrgChart.templates.ana1.field_0 = '{val}'; OrgChart.templates.ana1.link = ''; OrgChart.templates.ana2 = Object.assign({}, OrgChart.templates.ana); OrgChart.templates.ana2.size = [160, 40]; OrgChart.templates.ana2.field_0 = '{val}'; OrgChart.templates.ana2.link = '';
var chart = new OrgChart(document.getElementById("tree"), { template: "ana1", enableSearch: false, scaleInitial: OrgChart.match.boundary, mouseScrool: OrgChart.action.none, nodeMouseClick: OrgChart.action.none, levelSeparation: 20, nodeBinding: { field_0: "name" }, nodes: [ { id: 1, tags: ["h_center"], name: "Directeur" }, { id: 2, pid: 1, tags: ["assistant","h_center"], name: "Secrétariat" }, { id: 3, pid: 1, tags: ["assistant","h_center"], name: "Cellule Audit Interne" }, { id: 4, pid: 1, tags: ["assistant","h_center"], name: "Bureau d'Ordre" }, { id: 5, pid: 1, tags: ["assistant","h_center"], name: "Coordinations" }, { id: 6, pid: 1, tags: ["assistant","h_center"], name: "Cellule Guichet Unique" }, { id: 7, pid: 1, name: "Services Gestion du Réseau d'Irrigation et de Drainage" }, { id: 8, pid: 1, tags: ["sl1"], name: "Service Production Agricole" }, { id: 9, pid: 1, name: "Service Vulgarisation et Organisation Professionnelle" }, { id: 10, pid: 1, tags: ["sl1"], name: "Service Elevage" }, { id: 11, pid: 1, name: "Service Planification et Programmes" }, { id: 12, pid: 1, tags: ["sl1"], name: "Service Equipement Rural" }, { id: 13, pid: 1, name: "Service Administratif et Financier" }, { id: 14, pid: 1, tags: ["sl1"], name: "Service Matériel" }, { id: 15, pid: 11, name: "Bureau Programme" }, { id: 16, pid: 11, tags: ["sl1"], name: "Bureau Budget" }, { id: 17, pid: 11, name: "Bureau Suivi-Evaluation" }, { id: 18, pid: 11, tags: ["sl1"], name: "Bureau Informatique" }, { id: 19, pid: 11, name: "Bureau Marchés" }, { id: 20, pid: 11, tags: ["sl1"], name: "Bureau Comptable" }, { id: 21, pid: 11, name: "Cellule Comptable" }, { id: 22, pid: 12, name: "Bureau Etudes et Topographie" }, { id: 23, pid: 12, tags: ["sl1"], name: "Bureau Travaux Equipement Hydro-Agricole" }, { id: 24, pid: 12, name: "Bureau Aménagement Rural" }, { id: 25, pid: 7, name: "Bureau Exploitation Réseaux" }, { id: 26, pid: 7, tags: ["sl1"], name: "Bureau Entretien Réseaux" }, { id: 27, pid: 7, name: "Bureau Techniques Irrigation et Drainage" }, { id: 28, pid: 8, name: "Bureau Etudes Agro-Economiques" }, { id: 29, pid: 8, name: "Bureau Actions Agricoles" }, { id: 30, pid: 9, name: "Bureau Vulgarisation et Audio-Visuel" }, { id: 31, pid: 9, tags: ["sl1"], name: "Bureau Structures Foncières" }, { id: 32, pid: 9, name: "Bureau Organisation Professionnelle et Crédit" }, { id: 33, pid: 9, tags: ["sl1"], name: "Bureau Formation et Perfectionnement" }, { id: 34, pid: 9, name: "Bureau Gestion C.M.V." }, { id: 35, pid: 10, name: "Bureau Production Animale" }, { id: 36, pid: 13, name: "Bureau Personnel" }, { id: 37, pid: 13, tags: ["sl1"], name: "Bureau Financier" }, { id: 38, pid: 13, name: "Bureau Juridique et Domaniale" }, { id: 39, pid: 14, name: "Bureau Parc Auto et Matériel Agricole" }, { id: 40, pid: 14, tags: ["sl1"], name: "Bureau Approvisionnements" }, { id: 41, pid: 14, name: "Bureau Entretien des Immeubles" }, { id: 42, pid: 14, tags: ["sl1"], name: "Bureau Moyens Généraux" }, { id: 43, pid: 14, name: "Cellule Gestion Patrimoine" }, { id: 44, pid: 14, tags: ["sl1"], name: "Cellule Gestion Stock" }, ], tags: { "h_center": { template: "ana2" }, "sl1": { subLevels: 1 }, }, collapse: { level: 2 }, }); var timeout = null; window.addEventListener('resize', function(){ if (timeout){ clearTimeout(timeout) } timeout = setTimeout(function(){ chart.fit(); }, 500); }) chart.on('expcollclick', function (sender, collapsing, id, ids) { if (timeout){ clearTimeout(timeout) } timeout = setTimeout(function(){ chart.fit(); }, 500); });