Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Plotly : display a boxplot with one value

Hello
:slight_smile:

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 ?

Thanks,

Elkhait

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) %>%
layout(
title = “Sepal length boxplot by specy”,
xaxis = list(
title = “Specy”,
showticklabels = F),
yaxis = list(
title = “Sepal length”)
)