Hi,
I want to change the title of my plot according to the select input. Do you have any idea of how can I do that? I tried this way but it remains the same.
renderPlotly({
title1<-paste(input$var1, "por país")
if (input$var1=="Taxa_Natalidade")
names("Taxa de Natalidade")
else if (input$var1== "Taxa_Mortalidade")
names("Taxa de Mortalidade")
p<- dados() %>%
plotly::plot_geo(z = ~Media, color = ~Media, colors = col,text = ~pais, locations = ~codigo, marker = list(line = l))
p <- p %>% layout(title= title1,
width = 1000, height = 500,
geo = g
)
p
})