I have plotted the the 5 major cities temperature values, but it print like blank. I would like to set the Melbourne temperature as a default values. Can you help me out please. I have attached my interactive version here.https://plot.ly/~Nrnjn_adhikari/23/
p2 <- plot_ly(data = temp_data) %>%
add_lines(x=~Date, y=~Melbourne, name = “Melbourne”, visible = “legendonly”) %>%
add_lines(x=~Date, y=~Sydney, name = “Sydney”, visible = “legendonly”) %>%
add_lines(x=~Date, y=~Perth, name = “Perth”, visible = “legendonly”) %>%
add_lines(x=~Date, y=~Darwin, name = “Darwin”, visible = “legendonly”) %>%
add_lines(x=~Date, y=~Adelaide, name = “Adelaide”, visible = “legendonly”) %>%
layout(title = “Australian Major Cities Temperature Time Series”, showlegend=TRUE,
xaxis=list(zeroline = FALSE,title=“Date”, rangeslider = list(type = “date”)),
yaxis=list(zeroline = FALSE,title=“Temperature (Celsius)”),
updatemenus=updatemenus)
Hi @bcd, Thank you very much for your response. I could not get fix it yet. I have attached my update menus here. Can you please check this one. I will truly appreciate your time and effort.
Now, problem has been resolved when I deleted the legendonly inside the add_lines.
I have changed the single code in inside the plot object, this is corrected line
add_lines(x=~Date, y=~Melbourne, name = “Melbourne”) %>%