Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,10 +116,13 @@ if superposed:
|
|
| 116 |
# Personalizar el formato de tiempo en el eje X
|
| 117 |
if time_format == "Año":
|
| 118 |
tickformat = "%Y"
|
|
|
|
| 119 |
elif time_format == "Mes y Año":
|
| 120 |
tickformat = "%b %Y"
|
|
|
|
| 121 |
else: # "Día, Mes y Año"
|
| 122 |
tickformat = "%d %b %Y"
|
|
|
|
| 123 |
|
| 124 |
# Configuración de líneas de rejilla
|
| 125 |
grid_style = dict(showgrid=show_grid)
|
|
@@ -129,6 +132,7 @@ fig.update_layout(
|
|
| 129 |
yaxis_title=y_axis_label,
|
| 130 |
xaxis=dict(
|
| 131 |
tickformat=tickformat,
|
|
|
|
| 132 |
titlefont=dict(size=14),
|
| 133 |
tickfont=dict(size=12),
|
| 134 |
**grid_style
|
|
|
|
| 116 |
# Personalizar el formato de tiempo en el eje X
|
| 117 |
if time_format == "Año":
|
| 118 |
tickformat = "%Y"
|
| 119 |
+
dtick = "M12" # Intervalo de 1 año
|
| 120 |
elif time_format == "Mes y Año":
|
| 121 |
tickformat = "%b %Y"
|
| 122 |
+
dtick = "M1" # Intervalo de 1 mes
|
| 123 |
else: # "Día, Mes y Año"
|
| 124 |
tickformat = "%d %b %Y"
|
| 125 |
+
dtick = "D1" # Intervalo de 1 día
|
| 126 |
|
| 127 |
# Configuración de líneas de rejilla
|
| 128 |
grid_style = dict(showgrid=show_grid)
|
|
|
|
| 132 |
yaxis_title=y_axis_label,
|
| 133 |
xaxis=dict(
|
| 134 |
tickformat=tickformat,
|
| 135 |
+
dtick=dtick,
|
| 136 |
titlefont=dict(size=14),
|
| 137 |
tickfont=dict(size=12),
|
| 138 |
**grid_style
|