How to Set Tooltip for Node Fixed User Handles in JavaScript Diagram?
In Graphical User Interface (GUI), the tooltip is a message that is displayed when 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 JavaScript 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: 'Tooltip for fixed user handle',
position: 'TopLeft',
},
The below code example below shows how to set a tooltip for diagram node fixed user handles:
var nodes = [
{
id: 'node1',
offsetX: 300,
offsetY: 300,
height: 100,
width: 100,
style: { fill: '#64a6', strokeColor: '#64Abbb', strokeWidth: 3 },
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: 20, bottom: 10 },
//Tooltip for node fixed user handle
tooltip: { content: 'Node fixed user handle tooltip' , position: 'TopLeft'},
},
],
},
];
Sample - Click here for sample
Conclusion
I hope you enjoyed learning how to set tooltip for node fixed user handles in JavaScript Diagram.
You can refer to our JavaScript 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 JavaScript 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!