I have a simple figure whose only trace is a go.Indicator
object. I always have problems formatting this type of traces since they tend to take up about all available space if you let them.
This time, I am trying to add a line of text under the indicator number+delta. I have tried using the layout title this way:
import plotly.graph_objects as go
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=90,
number={
'font': {'size': 40},
'suffix': '%'
},
delta = {
'reference': 99,
'relative': True
},
domain={'row': 0, 'column': 0}
)).update_layout(
title={
'text': 'Han pasado {} d铆as desde la 煤ltima depuraci贸n'.format(6),
'y': 0.37,
'x': 0.5,
'font': {'size': 17}
},
#margin={'b': 70},
#height=150,
)
Doing this it kinda works. However, if the layout height changes, the title will lose its place since I have to adjust the title y
value according to the height. Since the indicator fills all the space of the figure, the layout title won鈥檛 appear just under it. What would be a way to fix the layout title just under the indicator, no matter its height or size, just as the indicator title is placed?
Is there a way to tell the indicator not to expand over all the available space, and use only the necessary height/width to represent itself?