JIT Spacetree Node Spacing Проблема

У меня возникла проблема с JIT Spacetree, когда узлы сильно разнесены друг от друга, что привело к непригодному виду. Первые несколько узлов хороши, но по мере того, как вы углубляетесь в дерево, расстояние между дочерними узлами увеличивается.

Я использую довольно ванильный конфиг, очень похожий на пример 1 на сайте JIT http://philogb.github.io/jit/static/v20/Jit/Examples/Spacetree/example1.html

Вот снимок экрана, который показывает фрагмент, но проблема еще хуже, чем это показывает, поскольку расстояние увеличивается еще больше с дополнительными узлами.

https://dl.dropboxusercontent.com/u/5454906/spacetree_issue.png

Я использовал это успешно некоторое время, но никогда не сталкивался с этой конкретной проблемой.

У кого-нибудь есть идеи / мысли?

Спасибо

Нил

Вот пример набора JSON, который генерируется.

{
"id": "Class91240",
"name": "Cube Org - OrgID",
"data": {"nodeType": "reportObj"},
"children": [{
    "id": "001",
    "name": "Data Warehouse - Org",
    "data": {"nodeType": "dataRep"},
    "children": [
        {
            "id": "002",
            "name": "DataWarehouse Loader - Update Org Data",
            "data": {"nodeType": "interface"},
            "children": [{
                "id": "003",
                "name": "Staging Database - MasterOrg",
                "data": {"nodeType": "dataRep"},
                "children": [
                    {
                        "id": "Class90189",
                        "name": "Staging Interface - Update Master Org Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91838",
                            "name": "Staging Database - ExtractABC",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class93632",
                                "name": "Staging Interface - Rates Data",
                                "data": {"nodeType": "busLogic"},
                                "children": [{
                                    "id": "Class90125",
                                    "name": "Operational Data Stored Procedures - Data",
                                    "data": {"nodeType": "interface"},
                                    "children": [{
                                        "id": "Class90387",
                                        "name": "sim_xyz_rates",
                                        "data": {"nodeType": "feed"},
                                        "children": []
                                    }]
                                }]
                            }]
                        }]
                    },
                    {
                        "id": "Class90340",
                        "name": "Staging Interface - Update  Master tables Budget Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91889",
                            "name": "Staging Database - ExtractPQR_Fact01",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class90308",
                                "name": "Web UI Interface - Export Template Data",
                                "data": {"nodeType": "interface"},
                                "children": [{
                                    "id": "Class91942",
                                    "name": "HTC Staging Database - DEF_Template",
                                    "data": {"nodeType": "dataRep"},
                                    "children": []
                                }]
                            }]
                        }]
                    },
                    {
                        "id": "Class90342",
                        "name": "Staging Interface - Update  Master tables Forecast Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91889",
                            "name": "Staging Database - ExtractPQR_Fact01",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class90308",
                                "name": "Web UI Interface - Export Template Data",
                                "data": {"nodeType": "interface"},
                                "children": [{
                                    "id": "Class91942",
                                    "name": "HTC Staging Database - DEF_Template",
                                    "data": {"nodeType": "dataRep"},
                                    "children": []
                                }]
                            }]
                        }]
                    }
                ]
            }]
        },
        {
            "id": "Class90324",
            "name": "DataWarehouse Loader - Update  Discovery  Tables Budget Data",
            "data": {"nodeType": "interface"},
            "children": [{
                "id": "003",
                "name": "Staging Database - MasterOrg",
                "data": {"nodeType": "dataRep"},
                "children": [
                    {
                        "id": "Class90189",
                        "name": "Staging Interface - Update Master Org Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91838",
                            "name": "Staging Database - ExtractABC",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class93632",
                                "name": "Staging Interface - Rates Data",
                                "data": {"nodeType": "busLogic"},
                                "children": [{
                                    "id": "Class90125",
                                    "name": "Operational Data Stored Procedures - Data",
                                    "data": {"nodeType": "interface"},
                                    "children": [{
                                        "id": "Class90387",
                                        "name": "sim_xyz_rates",
                                        "data": {"nodeType": "feed"},
                                        "children": []
                                    }]
                                }]
                            }]
                        }]
                    },
                    {
                        "id": "Class90340",
                        "name": "Staging Interface - Update  Master tables Budget Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91889",
                            "name": "Staging Database - ExtractPQR_Fact01",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class90308",
                                "name": "Web UI Interface - Export Template Data",
                                "data": {"nodeType": "interface"},
                                "children": [{
                                    "id": "Class91942",
                                    "name": "HTC Staging Database - DEF_Template",
                                    "data": {"nodeType": "dataRep"},
                                    "children": []
                                }]
                            }]
                        }]
                    },
                    {
                        "id": "Class90342",
                        "name": "Staging Interface - Update  Master tables Forecast Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91889",
                            "name": "Staging Database - ExtractPQR_Fact01",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class90308",
                                "name": "Web UI Interface - Export Template Data",
                                "data": {"nodeType": "interface"},
                                "children": [{
                                    "id": "Class91942",
                                    "name": "HTC Staging Database - DEF_Template",
                                    "data": {"nodeType": "dataRep"},
                                    "children": []
                                }]
                            }]
                        }]
                    }
                ]
            }]
        },
        {
            "id": "Class90331",
            "name": "DataWarehouse Loader - Update  Discovery Tables Forecast Data",
            "data": {"nodeType": "interface"},
            "children": [{
                "id": "003",
                "name": "Staging Database - MasterOrg",
                "data": {"nodeType": "dataRep"},
                "children": [
                    {
                        "id": "Class90189",
                        "name": "Staging Interface - Update Master Org Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91838",
                            "name": "Staging Database - ExtractABC",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class93632",
                                "name": "Staging Interface - Rates Data",
                                "data": {"nodeType": "busLogic"},
                                "children": [{
                                    "id": "Class90125",
                                    "name": "Operational Data Stored Procedures - Data",
                                    "data": {"nodeType": "interface"},
                                    "children": [{
                                        "id": "Class90387",
                                        "name": "sim_xyz_rates",
                                        "data": {"nodeType": "feed"},
                                        "children": []
                                    }]
                                }]
                            }]
                        }]
                    },
                    {
                        "id": "Class90340",
                        "name": "Staging Interface - Update  Master tables Budget Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91889",
                            "name": "Staging Database - ExtractPQR_Fact01",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class90308",
                                "name": "Web UI Interface - Export Template Data",
                                "data": {"nodeType": "interface"},
                                "children": [{
                                    "id": "Class91942",
                                    "name": "HTC Staging Database - DEF_Template",
                                    "data": {"nodeType": "dataRep"},
                                    "children": []
                                }]
                            }]
                        }]
                    },
                    {
                        "id": "Class90342",
                        "name": "Staging Interface - Update  Master tables Forecast Data",
                        "data": {"nodeType": "interface"},
                        "children": [{
                            "id": "Class91889",
                            "name": "Staging Database - ExtractPQR_Fact01",
                            "data": {"nodeType": "dataRep"},
                            "children": [{
                                "id": "Class90308",
                                "name": "Web UI Interface - Export Template Data",
                                "data": {"nodeType": "interface"},
                                "children": [{
                                    "id": "Class91942",
                                    "name": "HTC Staging Database - DEF_Template",
                                    "data": {"nodeType": "dataRep"},
                                    "children": []
                                }]
                            }]
                        }]
                    }
                ]
            }]
        }
    ]
}]

}

1 ответ

Возможно, это не является причиной вашей проблемы, но в вашей структуре json есть повторяющиеся узлы. Идентификаторы должны быть уникальными с SpaceTrees в JIT

Другие вопросы по тегам