Questions on generating the input format #38
Unanswered
jjj1231978
asked this question in
Q&A
Replies: 1 comment 1 reply
-
isn't this more of a question for scipy.hiearchy folks than this chart.js plugin? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's a great library. My understanding is that the input format needs to be in a format like this:
[
{ "name": "1" },
{ "name": "11", "parent": 0 },
{ "name": "111", "parent": 1 },
{ "name": "1111", "parent": 2 },
{ "name": "1112", "parent": 2 },
{ "name": "112", "parent": 1 },
{ "name": "1121", "parent": 5 },
{ "name": "1122", "parent": 5 },
{ "name": "113", "parent": 1 },
{ "name": "1131", "parent": 8 },
{ "name": "1132", "parent": 8 },
{ "name": "12", "parent": 0 },
{ "name": "121", "parent": 11 },
{ "name": "1211", "parent": 12 },
{ "name": "1212", "parent": 12 },
{ "name": "122", "parent": 11 },
{ "name": "1221", "parent": 15 },
{ "name": "1222", "parent": 15 },
{ "name": "123", "parent": 11 },
{ "name": "1231", "parent": 18 },
{ "name": "1232", "parent": 18 },
{ "name": "13", "parent": 0 },
{ "name": "131", "parent": 21 }
]
but the problem is that it is not automatically generated by existing packages like scipy.hierarchy, do you know how to transform scipy's output into this kind of format? Thanks so much.
Beta Was this translation helpful? Give feedback.
All reactions