Hi Martin,
We have created a sample in which we have added items to an dataSource at runtime. Please refer to an code example and sample.
Code example:
function addDataSource() {
var diagram = document.getElementById("diagram");
diagram = diagram.ej2_instances[0];
diagram.dataSourceSettings.dataManager.dataSource.json.push( { 'Name': 'Consulting', 'Category': 'Business' }, { 'Name': 'HR', 'Category': 'Business' });
diagram.clear();
diagram.refresh();
}
Regards,
Shyam G