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
252 stars 84 forks source link

OrgChartImportFromCSV and tags #676

Closed dklopfer2 closed 2 years ago

dklopfer2 commented 2 years ago

I'm not able to reproduce the assistant tag using the OrgChartImportFormCSV.sln example.

I've added the tag to the index.cshtml file and I updated the OrgChart.csv file and the chart is no different when rendered. What am I missing????

function init(links, nodes) { chart = new OrgChart(document.getElementById("tree"), { enableDragDrop: true, nodeMouseClickBehaviour: OrgChart.action.edit, nodeBinding: { field_0: "name" }, tags: { "assistant": { template: "ula" } },

OrgChart.csv id,name,tags,pid, 1,Rudy Doyle,, 2,Alexis Lewis fsd,assistant ,1 3,Aiden Dixon,,1 4,sdg,,2 5,new node,,3

plamen-peshev commented 2 years ago

Can you set

OrgChart.STRING_TAGS = false;

before the initialization of the chart

and tell me if it solves the issue

dklopfer2 commented 2 years ago

Sorry in delay,

Nope. Did not work provided I made the change in the correct place. I made it in orgchart.js changing OrgChart.STRING_TAGS != 1 to OrgChart.STRING_TAGS = false

Capture

ZornitsaPesheva commented 2 years ago

No, you don't have to change the orgchart.js file.. You need to do this:

OrgChart.STRING_TAGS = false;
var chart = new OrgChart(document.getElementById("tree"), {
    ...
});