I'd like to render a ring / pie - like graph that displays score which is calculated and returned by a callback.
Here's my attempt so far, 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=['60'], hole=.5)
return {'data':[trace]}
Is this possible to do with a pie chart given that I am not displaying any distributions?