Articles in this section

How to Remove Tooltip From Nodes and Connectors in Vue Diagram?

This article explains how to remove tooltips from nodes and connectors in Vue Diagram. In our Graphical User Interface (GUI), a tooltip appears when you hover your mouse over an element. This message provides additional information to enhance your experience and understanding of the interface.

If you prefer not to see these tooltips, you can easily remove them by disabling the tooltip constraints for nodes or connectors, respectively, in Vue Diagram.

Below is a code example demonstrating how to disable the tooltip for nodes/connectors:

<template>
   <div id="app">
       <ejs-diagram id="diagram" :width='width' :height='height' :getNodeDefaults='getNodeDefaults'
           :getConnectorDefaults='getConnectorDefaults' :layout='layout'
           :dataSourceSettings='dataSourceSettings'></ejs-diagram>
   </div>
</template>
<script>

import { DiagramComponent, HierarchicalTree, DataBinding,ConnectorConstraints,NodeConstraints } from '@syncfusion/ej2-vue-diagrams';
import { DataManager, Query } from "@syncfusion/ej2-data";

let data = [{
   Name: "Steve-Ceo"
},
{
   Name: "Kevin-Manager",
   ReportingPerson: "Steve-Ceo"
},
{
   Name: "Peter-Manager",
   ReportingPerson: "Steve-Ceo"
},
{
   Name: "John- Manager",
   ReportingPerson: "Peter-Manager"
},
{
   Name: "Mary-CSE ",
   ReportingPerson: "Peter-Manager"
},
{
   Name: "Jim-CSE ",
   ReportingPerson: "Kevin-Manager"
},
{
   Name: "Martin-CSE",
   ReportingPerson: "Kevin-Manager"
}];
let items = new DataManager(data, new Query().take(7));
export default {
   name: "App",
   components: {
       "ejs-diagram": DiagramComponent
   },
   data() {
       return {
           width: "100%",
           height: "350px",
           // Uses layout to auto-arrange nodes on the Diagram page
           layout: {
               // Sets layout type
               type: 'HierarchicalTree'
           },
           dataSourceSettings: {
               id: 'Name',
               parentId: 'ReportingPerson',
               dataManager: items
           },
           getNodeDefaults: (obj) => {
               obj.shape = {
                   type: 'Text',
                   content: obj.data.Name
               };
               obj.style = {
                   fill: 'None',
                   strokeColor: 'none',
                   strokeWidth: 2,
                   bold: true,
                   color: 'white'
               };
               obj.borderColor = 'white';
               obj.width = 100;
               obj.height = 40;
               obj.backgroundColor = '#6BA5D7';
               obj.borderWidth = 1;
               obj.shape.margin = {
                   left: 5,
                   right: 5,
                   top: 5,
                   bottom: 5
               };
                //define tooltip
                obj.tooltip = {
                 content : obj.data.Name
             }
             // Disable the tooltip for connector
             obj.constraints = NodeConstraints.Default & ~NodeConstraints.Tooltip;
               return obj;
           },
           getConnectorDefaults: (connector) => {
               connector.type = 'Orthogonal';
                // Define the tooltip for connector
                connector.tooltip = {
                 content : connector.id
               }
               // Disable the tooltip for connector
               connector.constraints = ConnectorConstraints.Default & ~ConnectorConstraints.Tooltip;
               return connector;
           },
       }
   },
   provide: {
       diagram: [DataBinding, HierarchicalTree]
   },
}
</script> 

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

Conclusion

We hope you enjoyed learning how to remove tooltips from nodes and connectors 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 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