I added text-annotation to scattermapbox. I’d like to add white background behind the text, so that its more visible.
Here’s a chunk of my code:
# Property Location
data.append({
"type": "scattermapbox",
"lat": [Lat],
"lon": [Long],
#"name": "Location",
"hovertext": price,
"text": "Net Effective Rent ${} SF/YR".format(price),
"textfont": {"size": 22},
"textposition": 'top-right',
"showlegend": False,
"hoverinfo": "text",
"mode": "text+markers",
"marker": {
"symbol": "suitcase",
"size": 28,
"opacity": 0.7
}
}
)
I have looked through the plotly API for text/annotation, however, I don’t see an option to do so: https://plotly.com/python/text-and-annotations/
1 post - 1 participant