Articles in this section

How to Set Custom Tooltip for Nodes in Angular Diagram?

In this article, you can learn about how to set a custom tooltip for nodes in an Angular diagram. In Syncfusion® Angular 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. This article demonstrates how to customize the tooltip content for nodes and connectors in the diagram.

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.

public nodes: NodeModel[] = [
 {
   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' }
 }
]; 

You can find a working example of this implementation on StackBlitz in the provided link: Click here for sample

Conclusion

I hope you enjoyed learning how to set a custom tooltip for nodes in the Angular Diagram. You can refer to our Angular Diagram feature tour page to learn about its other groundbreaking feature representations and documentation to quickly get started with 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 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!

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