gstdl commited on
Commit
9df2795
1 Parent(s): 7e1513f

convert to radio button

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -111,11 +111,11 @@ st.plotly_chart(box_plot(df, x, y))
111
 
112
  st.markdown('## Gapminder Lineplot')
113
  col1, col2, col3 = st.columns(3)
 
 
114
  with col1:
115
- label = st.selectbox("Select label", ["country", "continent"], key="lineplot_label")
116
- with col2:
117
  highlighted = st.selectbox("Select value to hightlight", df[label].unique(), key="lineplot_highlighting")
118
- with col3:
119
  y = st.selectbox("Select hue", metrics, key="lineplot_y")
120
  st.plotly_chart(line_plot(df, y, label, highlighted))
121
 
@@ -127,5 +127,5 @@ with col1:
127
  with col2:
128
  y = st.selectbox("Select y Axis", metrics, key="scatterplot_y")
129
  with col3:
130
- hue = st.selectbox("Select hue", ["country", "continent"], key="scatterplot_hue")
131
  st.plotly_chart(scatter_plot(df, x, y, hue))
 
111
 
112
  st.markdown('## Gapminder Lineplot')
113
  col1, col2, col3 = st.columns(3)
114
+ with col3:
115
+ label = st.radio("Select label", ["country", "continent"], key="lineplot_label")
116
  with col1:
 
 
117
  highlighted = st.selectbox("Select value to hightlight", df[label].unique(), key="lineplot_highlighting")
118
+ with col2:
119
  y = st.selectbox("Select hue", metrics, key="lineplot_y")
120
  st.plotly_chart(line_plot(df, y, label, highlighted))
121
 
 
127
  with col2:
128
  y = st.selectbox("Select y Axis", metrics, key="scatterplot_y")
129
  with col3:
130
+ hue = st.radio("Select hue", ["country", "continent"], key="scatterplot_hue")
131
  st.plotly_chart(scatter_plot(df, x, y, hue))