Hover tooltip shows only first letter when color and colors parameters are provided. Without color and colors parameters, the text is shown correctly.
library(plotly)
plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec,
color = as.factor(rownames(mtcars)),
colors = grDevices::heat.colors(nrow(mtcars)),
hoverinfo = "text",
text = rownames(mtcars)) %>% add_markers()
The code above produces the following figure:

The following figure is produced without color and colors parameters:

Managed to solve the issue by wrapping the value of text parameter into a list().
Hi Tuomastik, did you have any other insight into this problem? I have exactly the same problem, but listing the attributes only made it worse.
@drowsygoat Unfortunately no. I can only suggest comparing your implementation to the code snippet (and its solution) provided in my first comment.
I have run into the same problem. Instead of my custom hover text some points show "<" instead of the message. Putting the code inside a list() results in correct hover texts for the points that showed "<" before, but NO hover text for all other points.
This is how I code it
hoverinfo = 'text' ,
text = ~paste ('
', 'Cluster ID: ', Idf[[paste('sub.flow.', groupID, sep = '')]],
'
', 'Particle ID:', Idf[['newid' ]],
'
', paste(input[[paste('x_axis', plotID, sep = '_')]],': ', sep =''), format(round(Idf[[input[[paste('x_axis', plotID, sep = '_')]] ]], digits=2), nsmall =2),
'
', paste(input[[paste('y_axis', plotID, sep = '_')]],': ', sep =''), format(round(Idf[[input[[paste('y_axis', plotID, sep = '_')]] ]], digits=2), nsmall =2),
'
', paste(input[[paste('z_axis', plotID, sep = '_')]],': ', sep =''), format(round(Idf[[input[[paste('z_axis', plotID, sep = '_')]] ]], digits=2), nsmall =2)),

Additional info on this bug: If I run the plot on my full 100.000 data set, NO PROBLEM, as soon as I do any form of subsetting, varying from dfx[1:1000, ], dfx[listofrandomrownumbers, ] or grabbing 10% per category in a for loop, or running a dplyr arrange solution to subset, they all result in the same bug.
I also noticed that if i just plot 1 point, and it has the buggy hover, that rotating the camera view fixes it,
but if there are multiple points, this trick does nothing for the issue.
Same issue here, but the list() solution doesnt work
I believe I() (instead of list()) would be a more general work-around:
plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec,
color = as.factor(rownames(mtcars)),
colors = grDevices::heat.colors(nrow(mtcars)),
hoverinfo = "text",
text = I(rownames(mtcars))) %>% add_markers()
A proper fix for this will likely have to come from plotly.js -- I've started an issue here -- https://github.com/plotly/plotly.js/issues/2693
list worked for me, =D
hoverinfo = "text", text = list(size_cluster$sizesc)
This issue appears to be fixed now.
Most helpful comment
Managed to solve the issue by wrapping the value of
textparameter into alist().