How to Set Custom Tooltip for Nodes in Vue Diagram?
This article explains how to customize the tooltip content for nodes and connectors in the diagram. In Syncfusion® Vue Diagram, tooltips provide additional information about diagram elements when hovering over or interacting with them. By default, tooltips display details such as size, position, and angle information while dragging, resizing, or rotating nodes and connectors.
To customize the tooltip content for each node or connector, assign a value to the tooltip property. Below is a code example illustrating how to display a custom tooltip with the employee’s name when hovering over an employee image node.
let nodes = [
{
id: 'node1',
offsetX: 250, offsetY: 250,
height: 100, width: 100,
shape: {
type: 'Image',
source:
'https://ej2.syncfusion.com/demos/src/diagram/employees/image16.png',
},
// Constraints to enable tooltip
constraints: NodeConstraints.Default | NodeConstraints.Tooltip,
// Set custom tooltip content
tooltip: { content: 'John' }
}
];
Refer to the working sample for additional details and implementation: Click here for sample
Conclusion
We hope you enjoyed learning how to set custom tooltips for nodes in Vue Diagram.
You can refer to our Vue Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started with 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 explore 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, BoldDesk Support, or feedback portal. We are always happy to assist you!