✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Ggplotly ignoring ggplot geom_point fill colors

I’m having issues with going from ggplot to ggplotly for a USA states map. Specifically, the point fills are getting ignored.

fig results in a plot that have different point fill colors depended on the max rain, but fig 2 turns every point fill to blue.

Any suggestions? Code below:

yesterday <- Sys.Date()-1
fig <- plot_usmap(data = subset(statesdata, Date == yesterday), values = "avgRain", color = "white") + 
  scale_fill_continuous(low = "yellow", high = "blue", name = "Avg. Rain", limits = c(0, 4)) + 
  ggtitle(label = paste0("Average Rain (", yesterday, ")")) + 
  theme(legend.position = "right", plot.title = element_text(hjust = 0.5, size = 18)) + 
  geom_point(data = data2, aes(x=lon.1, y=lat.1, text=hover, fill=maxRain), color="black", pch=21, size = 2) +
  scale_color_continuous(low = "yellow", high = "blue", name = "Max. Rain", limits = c(0, 4))

fig2 <- ggplotly(fig, tooltip = c("hover"))