Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rendering graph in bullet list format #749

Open
TheGobbo opened this issue Jul 10, 2024 · 0 comments
Open

rendering graph in bullet list format #749

TheGobbo opened this issue Jul 10, 2024 · 0 comments

Comments

@TheGobbo
Copy link

TheGobbo commented Jul 10, 2024

The code snippet that I am trying to use looks like this

const test = {
  'name': 'Lao Lao',
  'title': 'general manager',
  'children': [
      { 'name': 'Bo Miao', 'title': 'department manager' },
      { 'name': 'Su Miao', 'title': 'department manager',
      'children': [
          { 'name': 'Tie Hua', 'title': 'senior engineer' },
          { 'name': 'Hei Hei', 'title': 'senior engineer',
          'children': [
              { 'name': 'Dan Dan', 'title': 'engineer' }
          ]
          },
          { 'name': 'Pang Pang', 'title': 'senior engineer' }
      ]
      },
      { 'name': 'Hong Miao', 'title': 'department manager' },
  ]
  };
  
  console.log(test, JSON.stringify(test));
  setTimeout(() => {
  this.orgChart = $(this.$refs.chartContainer).orgchart({
      data: test,
      nodeContent: 'title',
  });
  }, 1000);

But it currently outputs this structure in the div referenced by the $refs.chartContainer, can anyone help pls? I could't find anything in options to set/change this behavior.. using latest npm version

image

Repository owner deleted a comment from mm05112 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant