Articles in this section

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

To customize the nodes in a radial tree with custom HTML using Syncfusion®Vue 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:

nodeTemplate: function () {
return { template: itemVue };
},
// Function to set default properties for nodes  
getNodeDefaults: function (node){
node.shape.type ='HTML';
node.width = 150,
node.height = 150
return node; 
} , 
let itemVue = createApp({}).component("nodeTemplate",
{
//Template for rendering nodes with custom HTML content
template: `
<div>
<div style="background:yellow;height:100%;width:100%;text-align: center;border-radius: 50%;color:black">
<!-- Customized HTML content -->
<h1>{{ data.data.Name }}</h1>
</div>
</div>
`,
data() {
return {};
}
}); 

Sample

Conclusion
I hope you enjoyed learning how to change Radial tree node with custom html in Vue Diagram.

You can refer to our Vue 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 Vue 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)
Access denied
Access denied