Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Density mapbox tooltips

$
0
0

@Sampal wrote:

Hi!!

I’ve had a problem with tooltips in the density heatmap:
The documentation specifies that for showing text in tooltips you can pass a string or an array, but, while when I pass a String it works, when an array is given it doesn’t

Can anybody help me?

Thank you so much!


        density['data'] = [
            go.Densitymapbox(
                lat=lat, # Array
                lon=lon, # Array
                radius=20,
                z=values,
                text=texttype, # => This is a string, I need an Array
                name=dtype.upper(),
                hoverinfo='z+text',
                opacity=1
            )
        ]

Captura de pantalla de 2019-11-27 12-20-41

DOCS

text
Parent: data[type=densitymapbox]
Type: string or array of strings
Default: ""

Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace hoverinfo contains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images