I am using a plotly go.Indicator to show certain values of my dataset. This is my code:
import dash_core_components as dcc
import plotly.graph_objects as go
value = dff.shape[0]
fig = go.Figure()
fig.add_trace(go.Indicator(
mode="number",
value=value,
domain={'row': 0, 'column': 0},
title='Total number of incidences'
)
fig.update_layout(
paper_bgcolor ='lightgray',
grid={
'rows': 1,
'columns': 1,
'pattern': 'independent'
}
)
dcc.Graph(
id='indicator-incidences',
figure=fig
)
And here
is how the figure represents. As you can see, it expands to the total width of the page and has a height larger than necessary.
How can I achieve that the figure adjust the size to the indicator it contains?