Hello R Plotly Expert,
is the plotly in R able to have the similar feature as in dygraph?
What I am looking for is in plotly is that in dygraph, when we move about the plot, its values are able to show on the top legend, as seen here:
I would like the values to be displayed on the legend at the top, as what dygraph is able to do it.
Is this possible?
If it is possible, some code example to modify my below would be fantastic:
DateTime <- ExtruderTemperature$DateTime head_temp <- ExtruderTemperature$head_temp melt_temp <- ExtruderTemperature$melt_temp screw_temp <- ExtruderTemperature$screw_temp p1 <- ggplot(ExtruderTemperature,aes(x=DateTime)) + geom_line(aes(y=head_temp, color = 'head_temp')) + geom_line(aes(y=melt_temp, color = 'melt_temp')) + geom_line(aes(y=screw_temp, color = 'screw_temp')) p2 <- ggplotly(p1, tooltip = c("DateTime","y")) %>% config(displayModeBar = F) p2 <- layout(p2, legend = list(orientation = "h", # show entries horizontally xanchor = "center", # use center of legend as anchor x = 0.5), # put legend in center of x-axis hovermode = 'x unified') p2