Hi this is my first post to to this forum, I hope that the structure of it fits the best practices of the site! Anyways, I am trying desesperately to get an indicator graph fit inside of a dbc card. I cannot find a way to make it live inside. here is what I have:
graph:
fig3 = go.Figure()
fig3.add_trace(go.Indicator(
mode = "number+delta",
number = {"font":{"size":40},'prefix': "$"},
value = 2045672,
delta = {'reference': 30000},
gauge = {'shape': "bullet"},
title = {"text": "On Hand<br><span style='font-size:0.9em;color:gray'></span>"},
#title='Stock On Hand',
domain = {'x': [0, 1], 'y': [0, 1]},
))
fig3.update_layout(paper_bgcolor = "rgba(0,0,0,0)",
plot_bgcolor = "rgba(0,0,0,0)",
autosize=False,
width = 200,
height=200,
)
fig3.update_traces(align="center", selector=dict(type='indicator'))
and in html:
html.Div(children=[
html.Div(
html.Div(html.H1("Inventory Analysis")),className="col-sm-12"),
html.Div(children=[
html.Div(children=[
html.Div(dbc.Card(
[dbc.CardBody(
[html.Div(children=[dcc.Graph(figure=fig3)])
]
)],className="card", style={"width": "15rem", "height":"8rem"}
),
className='jumbotron', style={'background-color': '#fffffff'}),
])
],className="col-3 mx-auto"),
nothing does the trick, the graph keeps showing half outside of the card. Is it even something possible to achieve? Best regard