Plotly : display a boxplot with one value


I have been using plotly for about one month and I am really enjoying the visualizations ! I have found something strange with the boxplots, when we have only one value, the interactive legend doesn’t display (for exemple the name and the properties we want to see) ? Is it normal ?



Sounds like a bug, Can you share a reproducible example?

As you can see, the problem concerns the small boxes.

Can you share the data / layout options you used to generate that graph?

Data <- iris %>% mutate(Species = as.character(Species))
Data <- rbind(c(3.9, 4, 1.7, 0.36, “toto”), Data)

plot_ly(Data, y = ~Sepal.Length, color = ~Species, type = “box”, showlegend = FALSE) %>%
title = “Sepal length boxplot by specy”,
xaxis = list(
title = “Specy”,
showticklabels = F),
yaxis = list(
title = “Sepal length”)