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

Creating an image map with clickable areas

$
0
0

@markow wrote:

I am trying to create an image map with clickable areas with the below given code on an image file dashboard.gif.
I am not sure about my syntax but I get an error when trying to run the code:
AttributeError: ‘module’ object has no attribute ‘Map’

import dash
import dash_html_components as html

app = dash.Dash()

app.layout = html.Div([
	html.Img(
		html.Map([
			html.Area(target='', alt='gerar', title='gerar', href='1', coords='427,136,319,89', shape='rect'),
			html.Area(target='', alt='otimizar', title='otimizar', href='2', coords='142,170,34,123', shape='rect'),
			html.Area(target='', alt='assegurar', title='assegurar', href='3', coords='283,170,173,120', shape='rect')],
			name='image-map'
		),
		src='images/dashboard.gif', 
		usemap='#image-map'
	)
])

if __name__ == '__main__':
    app.run_server()

To me it seems that the Map attribute is not implemented for the html components. If so, any ideas how I could tackle this problem?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images