Description
I guess indicators are ment to be added to another trace on the figure in order to highlight something. However, it is necessary in some dashboards to show a number or percentage, being the indicator the only trace of the figure. This is tedious since an indicator with mode number
will fill all the space of the space available for the figure (let's say, all the column height and width).
I will give you a code example:
fig = go.Figure(go.Indicator(
title={
'text': 'Plazo máximo provisión cuentas<br><sub>Porcentaje de alta/reactivación de una cuenta en plazo</sub>',
'font': {'size': 17}
},
mode="number+delta",
value=100,
number={
'font': {'size': 40},
'suffix': '%'
},
delta = {
'reference': 99,
'relative': True
},
)).update_layout(
title={
'text': 'Han pasado {} días desde la última depuración'.format(6),
'y': 0.05,
'x': 0.5,
'font': {'size': 17}
}
)
and here you are an image with the results.
I am using the indicator to display a KPI performance. I have added a text under the indicator by using the figure title and placing at the bottom of it. However, as the indicator uses all the available space of the column, the figure title is displayed far away, instead of just close to the value as the indicator title is. This is just a use case, but I am sure there are other situations where this property of indicators is not suitable.
It would be nice if we could select by a property if the indicator should expand to use all the available space, or if we want it to only use the space it needs to be drawn.