Skip to content

How can we add custom text over the node tooltip?  #264

Open

Description

@Malikx-Alee

Currently the node does not show handleToolTipText like edges.

Below is the code for edges but it does not work for nodes:

edges:[
{
      type: "Dependence",
      source: "Exposition",
      target: "Exposed",
      handleTooltipText:
        "Dependence - Drag and Drop to Another Node to Reconnect",
    }
]

Activity

  1. yatingupta10 commented on Mar 5, 2021

    @yatingupta10

    +1

  2. ajbogh commented on Mar 5, 2021

    @ajbogh
    Contributor

    You can override node rendering with the renderNode function and return your own SVG component with the tooltip. Overriding the node rendering allows you to do so much more with the nodes that is not possible with the default nodes.

    Edges are different. We needed the handleTooltipText (provided by a contributor) because react-digraph has to render the edges itself. We do provide an afterRenderEdge function to help modify those edges, but we don't provide a renderEdge function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions