Closed dcooley closed 4 years ago
The colours don't show up in the legend
set_token( secret::get_secret("mapbox") ) df <- capitals df$my_colour <- ifelse( substr(df$country, 1, 1) == "A", "#00FF00FF", "#FF0000FF") l1 <- legend_element( variables = c("Begins with A", "Doesn't begin with A") , colours = c("#00FF00FF", "#FF0000FF") , colour_type = "fill" , variable_type = "category" ) js <- mapdeck_legend(l1) mapdeck() %>% add_scatterplot( data = capitals , fill_colour = "country" , legend = js )
The colours don't show up in the legend