Articles in this section

How to add custom properties to the node using React Diagram?

This article explains how to add custom properties to the node using React Diagram. The addInfo property of the node allows you to store additional information for that particular node using React Diagram.

Please refer to the following code example demonstrating how to add a custom property to a node using addInfo:

var nodes = [
 {
     id: 'node 1', offsetX: 300, offsetY: 250,height:100,width:100,
     addInfo: [
         {
             version: 'node1',
             capacity: 'abcd'
         }],
     annotations: [{ content: 'SDLC' }],
     style:{fill:'#6BA5D7'}
 },
 {
     id: 'node2', offsetX: 150, offsetY: 250,height:100,width:100,
     addInfo: [
         {
             version: 'node2',
             capacity: 'xyz'
         }
     ],
     annotations: [{ content: 'Support' }],
     style:{fill:'#6BA5D7'}
 },
];

Refer to the working sample for additional details and implementation: Sample

Conclusion

We hope you enjoyed learning about how to add custom properties to the node using React Diagram.

You can refer to our React Diagram feature tour page to know about its other groundbreaking feature representations and documentations. You can also explore our React Diagram example to understand how to present and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our React Spreadsheet and other components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied