title: Custom hoverinfo text on plotly R chart that is different to the 'text' parameter?
body: <p>I have been trying to create a network graph with the <code>plotly</code> R library. I would like to visualize a custom <code>hoverinfo</code> text that is <strong>different from the text label</strong> defined for the markers (or nodes in this case).</p>
  
  <p>Basically, I would like to keep the text labels on the markers (nodes) as they are currently but also be able to provide custom text for the <code>hoverinfo</code>.
  As in I would like the tooltip to display some other character vector different from the marker's label text. For instance, when I hover on the central 'Shigeru Miyamoto' node, I would like to tooltip to display other information that I may collect (eg. type, nationality etc). My understanding from the plotly documentation is that currently you can only display the same text label for both the markers and the hoverinfo tooltip.</p>
  
  <p>Is there a way to accomplish this?</p>
  
  <p>Here's the code I used:</p>
  
  <pre><code>library(plotly)
  library(igraph)
  library(dplyr)
  
  A &lt;- data.frame(A=rep("Shigeru Miyamoto",10))
  
  B &lt;- data.frame(B=c("Ninendo Company Ltd","Super Mario Bros","Mario", "Gamespot","Time Magazine","Wii","DOnkey Kong Jr","Mario Kart","Japan","Mario Party"))
  
  edgelist &lt;- bind_cols(A,B)
  
  graph &lt;- graph_from_data_frame(edgelist)
  L &lt;- layout_nicely(graph)
  vs &lt;- V(graph)
  es &lt;- as.data.frame(get.edgelist(graph))
  Ne &lt;- length(es[1]$V1)
  Xn &lt;- L[,1]
  Yn &lt;- L[,2]
  
  txt &lt;- list(
          family = "calibri",
          size = 15,
          color = "white",
          opacity = 1
  )
  
  size = c(20,rep(5,length(vs)-1))
  
  
  network &lt;- plot_ly(type = "scatter", x = Xn, y = Yn, mode = "markers+text", 
                     text = names(vs), hoverinfo = "text",marker=list(size=size,color='5BC0DE'), textfont = txt
  
  )
  
  
  edge_shapes &lt;- list()
  for(i in 1:Ne) {
          v0 &lt;- es[i,]$V1
          v1 &lt;- es[i,]$V2
  
          edge_shape = list(
                  type = "line",
                  line = list(color = "DF691A", width = 1),
                  x0 = Xn[match(v0,names(vs))],
                  y0 = Yn[match(v0,names(vs))],
                  x1 = Xn[match(v1,names(vs))],
                  y1 = Yn[match(v1,names(vs))],
                  opacity = 0.3
          )
  
          edge_shapes[[i]] &lt;- edge_shape}
  
  network &lt;- layout(
          network,
          paper_bgcolor="#4e5d6c",
          plot_bgcolor="#4e5d6c",
          hovermode = "closest",
          title = paste("Miyamoto's Relations",sep = ""),
          titlefont=list(color="white"),
          shapes = edge_shapes,
          xaxis = list(title = "", showgrid = FALSE, showticklabels = FALSE, zeroline = FALSE),
          yaxis = list(title = "", showgrid = FALSE, showticklabels = FALSE, zeroline = FALSE)
  
  
  )
  
  
  network
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rhOnv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rhOnv.png" alt="Graph"></a></p>