You can now display hierarchies using the Tree List Layout, which combines a tree structure with a scrollable list view.
OrgChart.templates.ula.node = function(node, data, template, config){ var fill = 'green'; if (data,.amount > 5000){ fill = 'red'; } return `<rect x="0" y="0" height="${node.h}" width="${node.w}" fill="${fill}"></rect>` };
Two new templates are available:
You can preview both in the Code demo.
OrgChart.TREELIST_WHEEL_STEP Controls the vertical scroll speed in the Tree List layout.
OrgChart.TREELIST_SCROLLBAR_WIDTH Sets the scrollbar width (in pixels) for the Tree List layout.
OrgChart.CONVERT_IMAGES_TO_BASE64_BEFORE_EXPORT Embeds external images as Base64 before export. This makes exported SVG files fully standalone and safe to share or view offline.
Each node now exposes additional information:
Example usage:
javascript OrgChart.templates.rony.field_0 = function(node, data, template, config, value){ return OrgChart.wrapText( value, `<text x="${node.w / 2}" y="40"></text>`, node.w - 15, 1 ); };
The following APIs have been removed. If you use any of them, you must migrate to the new Export functionality:
Removed methods and options:
exportPDFProfile
exportPDFPreview
exportPNGProfile
exportPDF
exportPDFFromCharts
exportPNG
exportSVG
exportVisio
OrgChart.pdfPrevUI
OrgChart.HIDE_EDIT_FORM_ON_PAN
onField
sticky