Iโd like to render a ring / pie - like graph that displays score which is calculated and returned by a callback.
I have defined the pie figure as:
# Asset Stabilization score graph
html.Div([
dcc.Graph(id='score_pie'),
], style={'display': 'inline-block', 'width': '60%', 'margin-left': '50%'}),
Callback:
@app.callback(Output("score-pie", "figure"),
[
Input("lbutton", "n_clicks"),
]
)
def render_score(n_clicks):
trace=go.Pie(labels=['Score'], values=['83'], hole=.5)
return {'data':[trace]}