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,
            export:true
        });
        editor.parse(JsonData);
  editor.data.add({ 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:
https://docs.dhtmlx.com/diagram/orgchart_guides__editor_mode.html#editorapi