OrgChart icon indicating copy to clipboard operation
OrgChart copied to clipboard

title and content in <ul> <li>

Open Paul75 opened this issue 2 years ago • 1 comments

hello,

When I can add with ul mode (

  • ...) title and content ?

    Thanks

Paul75 avatar Sep 24 '23 18:09 Paul75

Hi @Paul75 I create a demo on codepen.io for you -- https://codepen.io/dabeng-the-styleful/pen/YzgzEGp . The core snippets are shown below:

    var nodeTemplate = function(data) {
      return `
        <div class="title">${data.name}</div>
        <div class="content">
          ${data.members.map(member => `
            <li>${member.name}</li>
          `).join('')}
        </div>
      `;
    };

    var oc = $('#chart-container').orgchart({
      'data' : ds,
      'nodeTemplate': nodeTemplate
    });

dabeng avatar Dec 22 '23 14:12 dabeng