I'm using the Python library Dash and the documentation claims that it doesn't support the ability to write raw html with the dashboard html code. Is there a known work around to this (something like passing dcc.Graph
into render_template()
with Flask?).
The code snippet I would like to migrate to an Jinja template file is:
app.layout = html.Div(className='ui container', children=[
html.H1('Locations', className=''),
html.Div(id='text-content'),
dcc.Graph(id='map', figure={
'data': [{
'lat': df['LAT'],
'lon': df['LONG'],
'marker': {
'color': df['YEAR'],
'size': 8,
'opacity': 0.6
},
'customdata': df['NO'],
'type': 'scattermapbox'
}],
},
'hovermode': 'closest',
'margin': {'l': 0, 'r': 0, 'b': 0, 't': 0}
}
})
])