How to add org chart data


I can not add the org chart to the editor.

        var editor = new dhx.DiagramEditor(document.body, {
            type: "org",
            shapeType: "img-card",
            editMode: false,
            _checkEditMode: false,
            visibility: true,
        editor.parse(JsonData);{ id: "30000", text: "New Item", parent: "3000" });

error Uncaught TypeError: Cannot read property ‘add’ of undefined


It is not available to use the dhx.diagram API in the diagram editor.
Here you can find all the available API for the editor: