Articles in this section
Category / Section

How to Change Radial Tree Node With Custom HTML in Angular Diagram?

2 mins read

To customize the nodes in a radial tree with custom HTML using Syncfusion®Angular Diagram component, you need to set the node’s shape type to HTML. This allows you to include custom HTML content within each node. Once the shape type is set, you can define the nodeTemplate property to specify how each node should render using your custom HTML.
The nodeTemplate function provides the necessary structure for the HTML content, enabling you to fully customize the appearance of each node in the radial tree.

The below code snippet demonstrating how to to change Radial tree node with custom html:

// Function to set default properties for nodes 
public nodeDefaults(obj: NodeModel): NodeModel {
   obj.shape = {
     type: 'HTML',
   };
   obj.width = 150 
   obj.height = 150
   return obj;
} 
<!-- Template for rendering nodes with custom HTML content -->
<ng-template #nodeTemplate let-data >
<ng-container >
<div style="background:yellow;height:100%;width:100%;text-align: center;border-radius: 40%;color:black">
<!-- Customized HTML content -->
   <h1>{{ data.data.Name }}</h1>
</div>
</ng-container>
</ng-template> 

Sample

Conclusion

I hope you enjoyed learning how to change Radial tree node with custom HTML in Angular Diagram.

You can refer to our Angular Diagram feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Diagram example to understand how to create 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 other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, 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)
Please  to leave a comment
Access denied
Access denied