Articles in this section

How to Set Tooltip for Diagram Node Fixed User Handles in React?

This article explains how to set a tooltip for diagram node fixed user handles in React. In graphical user interface (GUI), the tooltip is a message that is displayed when the mouse hovers over an element. The diagram provides support to show a tooltip when the mouse hovers over any fixed user handle.
To set tooltip for node fixed user handles in React Diagram on mouse hover, we can use the tooltip property of the fixed user handle with the tooltip content . You can also customize other properties of the tooltip, such as position, width, height, etc.

// Set the tooltip for node fixed user handle
tooltip: {
   content: 'Node fixed user handle tooltip',
   position: 'TopLeft',
}, 

The below code example shows how to set a tooltip for diagram node fixed user handles

let node = [
 {
   id: 'node1',
   offsetX: 300,
   offsetY: 300,
   height: 100,
   width: 100,
   annotations: [
     {
       content: 'Node 1',
       height: 100,
       width: 100,
     },
   ],
   fixedUserHandles: [
     {
       id: 'color',
       pathData:
         'M31.5,13.5 C31.5,20.95,24.44,27,15.75,27 C7.059999999999999,27,0,20.95,0,13.5 C0,6.050000000000001,7.06,0,15.75,0 C24.44,0,31.5,6.05,31.5,13.5 Z M13.12,4.5 L13.12,11.25 L5.25,11.25 L5.25,15.75 L13.12,15.75 L13.12,22.5 L18.38,22.5 L18.38,15.75 L26.25,15.75 L26.25,11.25 L18.38,11.25 L18.38,4.5 Z ',
       width: 20,
       height: 20,
       offset: { x: 1, y: 0 },
       margin: { left: 10, bottom: 10 },
       // Tooltip for node fixed user handle
       tooltip: {
         content: 'Node fixed user handle tooltip',
         position: 'TopLeft',
       },
     },
   ],
 },
]; 

Refer to the working sample for additional details and implementation: Click here for sample

Conclusion

we hope you enjoyed learning how to set a tooltip for Diagram node fixed user handles in React.

You can refer to our React 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 React 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