I’m creating a dashboard for my personal project. Here’s what it looks like (it’s not completed yet tho):
What I want is to also “put” my Plotly graph inside a box shape just like the average rating, total reviews, and total downloads. So perhaps it’ll look something like this:
Is there any way to achieve that? I’ve looked for a solution but couldn’t find any. Hope someone can help me. Thank you!
Btw, this is the code that I used for creating the box shape for the average rating, total reviews, and total downloads:
with col1:
st.markdown("<h4>Average Rating</h4>", unsafe_allow_html=True)
wch_colour_box = (245, 168, 184)
# wch_colour_box = (255, 255, 255)
wch_colour_font = (0, 0, 0)
fontsize = 50
valign = "left"
iconname = "fas fa-star"
i = round(df["score"].mean(), 2)
htmlstr = f"""
<p style='background-color: rgb(
{wch_colour_box[0]},
{wch_colour_box[1]},
{wch_colour_box[2]}, 0.75
);
color: rgb(
{wch_colour_font[0]},
{wch_colour_font[1]},
{wch_colour_font[2]}, 0.75
);
font-size: {fontsize}px;
border-radius: 7px;
padding-top: 40px;
padding-bottom: 40px;
line-height:25px;
display: flex;
align-items: center;
justify-content: center;'>
<i class='{iconname}' style='font-size: 40px; color: #ed203f;'></i> {i}</p>
"""
st.markdown(lnk + htmlstr, unsafe_allow_html=True)