Callback Output returns a list of strings. The question is how to render each element of the list in a different row, for example in dbc.Card:
dbc.Card(
dbc.ListGroup(
[
dbc.ListGroupItem("Item 1"),
dbc.ListGroupItem("Item 2"),
dbc.ListGroupItem("Item 3"),
],
flush=True,
),
style={"width": "18rem"},
)
The callback looks like this one:
@app.callback(
Output('hover-data', 'children'),
Input('crossfilter-teams-scatter', 'hoverData'))
def display_hover_data(hoverData):
t1 = hoverData.get('points')[0].get('hovertext')
t1 = t1.split(',')
return t1
3 posts - 2 participants









