Open
Description
I am building a map using plot_ly and am unable to correctly display information using text and hoverinfo. To debug, I tried to recreate this map found on this website:
https://blog.cpsievert.me/2018/03/30/visualizing-geo-spatial-data-with-sf-and-plotly/
plot_ly(
franconia,
split = ~NUTS_ID,
color = ~district,
stroke = I("black"),
text = ~paste(NAME_ASCI, "\n is in", district),
hoverinfo = "text",
hoveron = "fill"
)
however only the nuts_id information is showing.
Thus, when I run this code:
plot_ly(data = full_pov_census_data,
split =~NAME,
color =~NumbImpoverished,
showlegend = FALSE,
alpha = 1,
type = 'scatter',
mode = 'lines')
only the NAME variable shows up when I hover.
Do you mind helping me solve this problem?
Thank you in advance
Metadata
Metadata
Assignees
Labels
No labels