✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

How to display variable value as output? (Easy question)

I have a very simple question. I am trying to show summary of my data as:

Total cases:
Total deaths:

I have shown graphs and everything in my dashboard, but I can’t find anything on how to display just text as output.
Graphs are updated from the dropdown value according to user choice. So, the summary is also according to users selection.

1 Like

update the children property as an Output

Add something like a html.P() component to the div you wish to view the text in. Use a callback to output the text to the id of that P component. Hope that helps.

Hi you can use this:

					html.Div(
						children=[
							html.P('Description:',
								style={
									'fontSize': 17
								}
							),
							html.P('{0:.1f}K'.format(variable_or_field_to_show),
								style={
									'fontSize': 40
								}
							)
						], 
						style={
							'width': '25%', 
							'display': 'inline-block'
						}
					),

Note: '{0:.1f}K -> layout format -> 31878.0K