Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,6 +42,9 @@ stacked = st.sidebar.checkbox("Apilar Franjas de Tiempo", value=True)
|
|
| 42 |
# Seleccionar el ancho de la barra de variable
|
| 43 |
bar_width = st.sidebar.slider("Ancho de la Barra de Variable", min_value=0.1, max_value=1.0, value=0.5, step=0.1)
|
| 44 |
|
|
|
|
|
|
|
|
|
|
| 45 |
# Crear el DataFrame con franjas de tiempo
|
| 46 |
data_list = []
|
| 47 |
for y_name, (start_date, end_date) in y_values.items():
|
|
@@ -74,7 +77,9 @@ if time_format == "Año":
|
|
| 74 |
else:
|
| 75 |
tickformat = "%Y-%m-%d" # Ajusta según el formato deseado
|
| 76 |
|
| 77 |
-
#
|
|
|
|
|
|
|
| 78 |
fig.update_layout(
|
| 79 |
xaxis_title="Tiempo",
|
| 80 |
yaxis_title="Variables",
|
|
@@ -82,10 +87,12 @@ fig.update_layout(
|
|
| 82 |
tickformat=tickformat,
|
| 83 |
titlefont=dict(size=14),
|
| 84 |
tickfont=dict(size=12),
|
|
|
|
| 85 |
),
|
| 86 |
yaxis=dict(
|
| 87 |
titlefont=dict(size=14),
|
| 88 |
tickfont=dict(size=12),
|
|
|
|
| 89 |
),
|
| 90 |
width=800,
|
| 91 |
height=600,
|
|
|
|
| 42 |
# Seleccionar el ancho de la barra de variable
|
| 43 |
bar_width = st.sidebar.slider("Ancho de la Barra de Variable", min_value=0.1, max_value=1.0, value=0.5, step=0.1)
|
| 44 |
|
| 45 |
+
# Opción para mostrar/ocultar líneas de rejilla
|
| 46 |
+
show_grid = st.sidebar.checkbox("Mostrar Líneas de Rejilla", value=True)
|
| 47 |
+
|
| 48 |
# Crear el DataFrame con franjas de tiempo
|
| 49 |
data_list = []
|
| 50 |
for y_name, (start_date, end_date) in y_values.items():
|
|
|
|
| 77 |
else:
|
| 78 |
tickformat = "%Y-%m-%d" # Ajusta según el formato deseado
|
| 79 |
|
| 80 |
+
# Configuración de líneas de rejilla
|
| 81 |
+
grid_style = dict(showgrid=show_grid)
|
| 82 |
+
|
| 83 |
fig.update_layout(
|
| 84 |
xaxis_title="Tiempo",
|
| 85 |
yaxis_title="Variables",
|
|
|
|
| 87 |
tickformat=tickformat,
|
| 88 |
titlefont=dict(size=14),
|
| 89 |
tickfont=dict(size=12),
|
| 90 |
+
**grid_style
|
| 91 |
),
|
| 92 |
yaxis=dict(
|
| 93 |
titlefont=dict(size=14),
|
| 94 |
tickfont=dict(size=12),
|
| 95 |
+
**grid_style
|
| 96 |
),
|
| 97 |
width=800,
|
| 98 |
height=600,
|