Spaces:
Sleeping
Sleeping
added horizontal graph
Browse files- src/streamlit_app.py +14 -1
src/streamlit_app.py
CHANGED
@@ -50,6 +50,7 @@ st.header("Line Chart")
|
|
50 |
st.plotly_chart(line_chart)
|
51 |
|
52 |
# Bar graph
|
|
|
53 |
bar_graph = px.bar(
|
54 |
al_df,
|
55 |
title = "Bar Graph",
|
@@ -59,10 +60,22 @@ y = "Large Bags"
|
|
59 |
st.plotly_chart(bar_graph)
|
60 |
|
61 |
#Bar Color
|
|
|
62 |
bar_graph = px.bar(
|
63 |
x = al_df["Date"],
|
64 |
y = al_df["Large Bags"],
|
65 |
title = "Bar Graph",
|
66 |
color=al_df["Large Bags"]
|
67 |
)
|
68 |
-
st.plotly_chart(bar_graph)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
st.plotly_chart(line_chart)
|
51 |
|
52 |
# Bar graph
|
53 |
+
st.header("Bar Graph")
|
54 |
bar_graph = px.bar(
|
55 |
al_df,
|
56 |
title = "Bar Graph",
|
|
|
60 |
st.plotly_chart(bar_graph)
|
61 |
|
62 |
#Bar Color
|
63 |
+
st.header("Bar Graph with Color")
|
64 |
bar_graph = px.bar(
|
65 |
x = al_df["Date"],
|
66 |
y = al_df["Large Bags"],
|
67 |
title = "Bar Graph",
|
68 |
color=al_df["Large Bags"]
|
69 |
)
|
70 |
+
st.plotly_chart(bar_graph)
|
71 |
+
|
72 |
+
# Horizontal Bar Graph
|
73 |
+
st.header("Horizontal Bar Graph")
|
74 |
+
bar_graph = px.bar(
|
75 |
+
al_df,
|
76 |
+
x = "Large Bags",
|
77 |
+
y = "Date",
|
78 |
+
title = "Bar Graph",
|
79 |
+
color="Large Bags",
|
80 |
+
orientation='h'
|
81 |
+
)
|