-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
st.metrics can be a string: in this case it shouldn't show the arrow up/down:
st.metrics("label", value=20, delta="Going up") is rendered as ↑ Going up
Currently the down arrow is shown when the string begins with minus, but the minus itself is not removed from the visualized text:
st.metrics("label", value=10, delta="Going down") is rendered as ↑ Going down
st.metrics("label", value=10, delta="-Going down") is rendered as ↓ -Going down
It would be more intuitive to remove the arrow in case of a string parameter, and left to the user to add it to the string just in case of need. This change would also allow to use the delta text as an extra field to add additional info not strictly related to value changes such as in:
st.metrics("label", value=10, delta="Value is nominal").
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.