File size: 1,431 Bytes
e9331b4 e49c25d e9331b4 e854deb f25c4f7 e49c25d d2bc1b0 e49c25d e854deb e49c25d f25c4f7 e854deb f25c4f7 e854deb f25c4f7 e854deb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
import streamlit as st
import pandas as pd
import numpy as np
# Set page layout to wide
st.set_page_config(layout="wide")
st.title("CEO Dashboard")
# Existing metric cards code
col1, col2, col3, col4 = st.columns(4)
col1.metric("Market Share", "14%", "1%")
col2.metric("Revenue", "246971", "14%")
col3.metric("Cost", "101500", "4%")
col4.metric("Profit", "145471", "10%")
# Fake data for the bar charts
data1 = pd.DataFrame({
'QTR': ['Q1', 'Q2', 'Q3', 'Q4'],
'Market Share': np.random.randint(10, 20, size=4)
})
data2 = pd.DataFrame({
'QTR': ['Q1', 'Q2', 'Q3', 'Q4'],
'Market Share': np.random.randint(20, 30, size=4)
})
data3 = pd.DataFrame({
'QTR': ['Q1', 'Q2', 'Q3', 'Q4'],
'Market Share': np.random.randint(30, 40, size=4)
})
data4 = pd.DataFrame({
'QTR': ['Q1', 'Q2', 'Q3', 'Q4'],
'Market Share': np.random.randint(40, 50, size=4)
})
# Reduced height for the bar charts
chart_height = 200
# Creating the bar charts
col1, col2 = st.columns(2)
with col1:
st.write("Kuch tho bhi1")
st.bar_chart(data1.set_index('QTR'), height=chart_height)
with col2:
st.write("Kuch tho bhi1")
st.bar_chart(data2.set_index('QTR'), height=chart_height)
col3, col4 = st.columns(2)
with col3:
st.write("Kuch tho bhi1")
st.bar_chart(data3.set_index('QTR'), height=chart_height)
with col4:
st.write("Kuch tho bhi1")
st.bar_chart(data4.set_index('QTR'), height=chart_height) |