Choropleth maps don't work online

Issue with choropleth map (global or continent level) maps, display ok in RStudio (apart from the colour coding being incorrect for a few countries - hover shows correct values) but online it will not show the graph. Will not show the map when clicked on in the plotly account or when embedded on wordpress page.

Does anyone know a solution? (rather than turning it into a ggplot map before converting to plotly). I can’t find anyone with similar issues online. Tested on two computers (PC and Mac).