Hi!
I am new to dash and python in general. I am trying to add a green up or red down arrow to indicate an increase or decrease based on a value that is in an html.Span component.
My div looks like this
and I want it to become like this for instant in case the popularity is +ve. and down red arrow in case it is -ve
Basically the popularity is a change rate that is already calculated in my dataframe. Depending on user selection of a value , the popularity value changes based on the selected filters.
Below is the code that generates this component
html.Div(children=
[html.Span('Popularity', style={'font-size':'19px','color':'#212121',
'display':'flex','justify-content':'center',
'padding':'15px 0px 0px 0px'}),
html.Br(),
html.Br(),
html.Span(id='pop_chgrate',children=[f'{pop_chgrate} %'],style={'color':'black','font-size':'30px',
'padding':'15px 5px 0px 10px'}),
html.Br(),
html.Span(' increase in Likes and Retweets vs last month.',style={'font-size':'18px',
'padding':'35px 10px 0px 10px'})
],
style={'width':'230px','height':'268px','border':'1px solid lightgrey', 'borderRadius':'15px',
'borderWidth':'1px','box-shadow': '2px 2px 2px lightgrey','display':'inline-block',
'margin':'10px 0px 0px 42px'}
)
Does anyone know how to add this increase or decrease indicator? or any equivalent thing?
Thanks.