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

Grouping same node included by different parent - is it possible? #148

Open
tomekit opened this issue Jun 27, 2019 · 0 comments
Open

Grouping same node included by different parent - is it possible? #148

tomekit opened this issue Jun 27, 2019 · 0 comments

Comments

@tomekit
Copy link

tomekit commented Jun 27, 2019

This is my tree:
Screenshot from 2019-06-27 09-42-40

Is it possible to not repeat the treantAss1 node, but rather make it appear once and be referenced directly from: treantAss2 and treantMap2 nodes?

This is JS config:

var treantAss1 = {
  "text": {
    "number": "treantAss1"
  },
  "children": [
    {
      "text": {
        "number": "treantMap1"
      },
      "children": [
        {
          "text": {
            "number": "treantPN1"
          }
        }
      ]
    },
    {
      "text": {
        "number": "treantPN2"
      }
    }
  ]
};

var nodeStructure =
{
  "text": {
    "number": "treantAss3"
  },
  "children": [
    {
      "text": {
        "number": "treantAss2"
      },
      "children": [
        {
          "text": {
            "number": "treantPN3"
          }
        },
        treantAss1
      ]
    },
    {
      "text": {
        "number": "treantMap2"
      },
      "children": [
        treantAss1
      ]
    }
  ]
};


var chart_config = {
    chart: {
        rootOrientation: "WEST",
        container: "#basic-example",

      animateOnInit: true,

        node: {
            collapsable: true
        },
        animation: {
            nodeAnimation: "easeOutBounce",
            nodeSpeed: 700,
            connectorsAnimation: "bounce",
            connectorsSpeed: 700
        }
    },
    nodeStructure: nodeStructure
};
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