OrgChart JS is a simple, flexible and highly customizable organization chart plugin for presenting the structure of your organization and the relationships in an elegant way.
I am building an org-chart and am having an issue with my custom template for filtered items. Specifically I want to prevent sublevel links from rendering.
I know I can change the rendering for sublevels at the templates level, but this removes sublevel links for my entire org-chart.
OrgChart.templates.subLevel.link = '';
If I'm using a custom template (to remove nodes when filtering) there is access for link, no access for subLevel.link - it does not appear to be available for custom templates.
OrgChart.templates.filtered = Object.assign({}, OrgChart.templates.ana);
OrgChart.templates.filtered.size = [0, 0];
OrgChart.templates.filtered.node = '';
OrgChart.templates.filtered.link = '';
OrgChart.templates.filtered.subLevel.link = ''; // THIS WILL CAUSE AN ERROR
So when I want to filter the tree and apply my custom template to the nodes that are to be filtered out
tags: {
filter: {
template: 'filtered',
},
Everything gets the custom template except for subLevel links which remain visible.
Is this a feature that is available, or is there an alternative way to do this?
It's frustrating to be able to customise links but not the sublevel links. It means when I am filtering my org chart I end up with lines remaining.
I am building an org-chart and am having an issue with my custom template for filtered items. Specifically I want to prevent sublevel links from rendering.
I know I can change the rendering for sublevels at the templates level, but this removes sublevel links for my entire org-chart.
OrgChart.templates.subLevel.link = '';
If I'm using a custom template (to remove nodes when filtering) there is access for link, no access for subLevel.link - it does not appear to be available for custom templates.
So when I want to filter the tree and apply my custom template to the nodes that are to be filtered out
Everything gets the custom template except for subLevel links which remain visible.
Is this a feature that is available, or is there an alternative way to do this?
It's frustrating to be able to customise links but not the sublevel links. It means when I am filtering my org chart I end up with lines remaining.