Hi,
We generated the
sample using the provided data, and in the diagram, only one node is rendered
based on the data. To render the image within the node, utilize the setNodeTemplate method, incorporating the image specified in the JSON data. Refer the below documentation and sample for your reference.
Code-snippet
|
function setNodeTemplate(obj, diagram) {
var content = new
ej.diagrams.StackPanel();
content.id = obj.id +
'_outerstack'; content.orientation = 'Horizontal';
content.style.strokeColor = 'gray'; content.padding = { left: 5,
right: 10, top: 5, bottom: 5 };
var image = new
ej.diagrams.ImageElement();
image.width = 50; image.height
= 50; image.style.strokeColor =
'none';
image.source =
obj.data.ProfileImage; image.id =
obj.id + '_pic';
content.children = [image];
return content;
}
|
Documentation
https://ej2.syncfusion.com/documentation/diagram/automatic-layout#setnodetemplate
Sample
https://stackblitz.com/edit/yjqfxh-w21kgp?file=index.html,index.js
Regards,
Gobinath