BALKANGraph / OrgChartJS

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.
https://balkan.app/orgchartjs
247 stars 84 forks source link

Does OrgChartJS supports dynamic nodeBinding? #802

Closed WiXSL closed 8 months ago

WiXSL commented 9 months ago

I mean a way to show different fields for different node types identified by tags. Something like:

tags: {
     company: {
          nodeBinding: {
                  field_0: "title",
                  img_0: "image"
          }
     },
     employee: {
         nodeBinding: {
               field_0: "name",
               field_1: "last_name",
               img_0: "image"
         }
    }
 },
ZornitsaPesheva commented 9 months ago

You can do this with different field names that have the same definition.

nodeBinding: {
    field_0_company: "title",
    field_0_employee: "name",
    field_1: "last_name",
    img_0: "image"
}

Or you can have different templates for company and employee.