Articles in this section

How to Add Custom Tooltip for Shapes in the Palette of Vue Diagram?

This article explains how to add a custom tooltip for shapes in the palette of the Vue Diagram. A tooltip is a text element that appears when a user hovers over an item, providing contextual information. In the Vue Diagram, tooltips can be shown on any diagram element such as nodes, connectors, or other components, making it easy to convey additional information. Tooltips are also available in the SymbolPalette, where they appear when the mouse hovers over any symbol.

To set a custom description for tooltips in the SymbolPalette, use the node’s tooltip property. This allows you to display custom content instead of the default node ID. Set the desired text in the tooltip’s content property to customize the tooltip for each symbol. Ensure that tooltip constraints are enabled in NodeConstraints for custom tooltips to appear.

The following code example demonstrates how to set a custom tooltip for symbols in the SymbolPalette:

let basicShapes = [
 { id: "Rectangle", shape: { type: "Basic", shape: "Rectangle" },
 tooltip:{
   content: 'Customized Tooltip',
 },
 // Enable customized tooltip to display on the symbol
 constraints: NodeConstraints.Default | NodeConstraints.Tooltip },
 { id: "Ellipse", shape: { type: "Basic", shape: "Ellipse" },
 tooltip:{
   content: 'Customized Tooltip',
 },
 // Enable customized tooltip to display on the symbol
 constraints: NodeConstraints.Default | NodeConstraints.Tooltip },
];

palettes: [
       {
         id: "flow",
         iconCss: 'e-ddb-icons e-flow', 
         expanded: true,
         symbols: flowShapes,
         title: "Flow Shapes"
       },
       {
         id: "basic",
         iconCss: 'e-ddb-icons e-basic',
         expanded: true,
         symbols: basicShapes,
         title: "Basic Shapes"
       },
     ], 

Refer to the working sample for additional details and implementation: Sample

Conclusion

We hope you enjoyed learning how to add custom tooltips for shapes in the palette of 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 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, 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