0

Tree の隣接表現を持つ JSON String があります。このツリーを視覚化するプログラムを作成する必要があります。可能なアプローチは何ですか?Wekaから生成されたようなものが必要です..

サンプル Json は次のとおりです。

[{
          "parent_index" : -1,
          "ClassLable" : "TEMPERATURE",
          "ChildNum" : 4,
          "AttributeTest" : "NULL"
     }, {
          "parent_index" : 0,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : "<65"
     }, {
          "parent_index" : 0,
          "ClassLable" : "WINDY",
          "ChildNum" : 2,
          "AttributeTest" : "65-80.5"
     }, {
          "parent_index" : 2,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : "false"
     }, {
          "parent_index" : 2,
          "ClassLable" : "HUMIDITY",
          "ChildNum" : 4,
          "AttributeTest" : "true"
     }, {
          "parent_index" : 4,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : "<64"
     }, {
          "parent_index" : 4,
          "ClassLable" : "no",
          "ChildNum" : 0,
          "AttributeTest" : "64-74.5"
     }, {
          "parent_index" : 4,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : "74.5-85"
     }, {
          "parent_index" : 4,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : ">85"
     }, {
          "parent_index" : 0,
          "ClassLable" : "HUMIDITY",
          "ChildNum" : 4,
          "AttributeTest" : "80.5-96"
     }, {
          "parent_index" : 9,
          "ClassLable" : "no",
          "ChildNum" : 0,
          "AttributeTest" : "<64"
     }, {
          "parent_index" : 9,
          "ClassLable" : "WINDY",
          "ChildNum" : 2,
          "AttributeTest" : "64-74.5"
     }, {
          "parent_index" : 11,
          "ClassLable" : "no",
          "ChildNum" : 0,
          "AttributeTest" : "false"
     }, {
          "parent_index" : 11,
          "ClassLable" : "no",
          "ChildNum" : 0,
          "AttributeTest" : "true"
     }, {
          "parent_index" : 9,
          "ClassLable" : "WINDY",
          "ChildNum" : 2,
          "AttributeTest" : "74.5-85"
     }, {
          "parent_index" : 14,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : "false"
     }, {
          "parent_index" : 14,
          "ClassLable" : "no",
          "ChildNum" : 0,
          "AttributeTest" : "true"
     }, {
          "parent_index" : 9,
          "ClassLable" : "no",
          "ChildNum" : 0,
          "AttributeTest" : ">85"
     }, {
          "parent_index" : 0,
          "ClassLable" : "yes",
          "ChildNum" : 0,
          "AttributeTest" : ">96"
     }
]
4

1 に答える 1

0

GoogleチャートAPIを使用してツリーを生成しました(組織図APIを使用しました)

于 2012-08-08T08:12:54.183 に答える