I'm using dash to build a dashboard where I am creating a unique url whenever a particular data point is clicked, how can I redirect users to this created url? I'm using the below given code where whenever someone click on any data points, click event will trigger and callback function executes.
app.layout = html.Div(children=[
html.H1(children='Plot'),
dcc.Graph(id='example-graph',
figure = plot()),
html.Div(id='dummy-div')
])
@app.callback(Output('dummy-div', 'childern'),
Input('graph', 'clickData'))
def redirect_to_url(clickData):
triggered_id = dash.callback_context.triggered[0]['prop_id'].split('.')[0]
if triggered_id=='graph' and clickData is not None:
url = 'https:www.example.com'
# need to develop to a method to redirect to this url