Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,7 +87,7 @@ for idx, (y_name, (start_date, end_date)) in enumerate(y_values.items()):
|
|
| 87 |
'Color': colors[idx], # Asignar color a cada variable
|
| 88 |
'Opacity': opacity,
|
| 89 |
'Border Width': border_width,
|
| 90 |
-
'Border
|
| 91 |
})
|
| 92 |
|
| 93 |
data = pd.DataFrame(data_list)
|
|
@@ -105,7 +105,7 @@ fig = px.timeline(data, x_start="Start", x_end="End", y="Category", color="Varia
|
|
| 105 |
# Actualizar los colores y estilos de las franjas
|
| 106 |
for idx, row in data.iterrows():
|
| 107 |
fig.data[idx].update(marker_color=row['Color'], opacity=row['Opacity'])
|
| 108 |
-
fig.data[idx].update(marker_line=dict(width=row['Border Width'], color=
|
| 109 |
|
| 110 |
# Actualizar el diseño del gráfico
|
| 111 |
fig.update_yaxes(categoryorder="total ascending")
|
|
|
|
| 87 |
'Color': colors[idx], # Asignar color a cada variable
|
| 88 |
'Opacity': opacity,
|
| 89 |
'Border Width': border_width,
|
| 90 |
+
'Border Color': hex_to_rgba(colors[idx], border_opacity) # Asignar color del borde con opacidad
|
| 91 |
})
|
| 92 |
|
| 93 |
data = pd.DataFrame(data_list)
|
|
|
|
| 105 |
# Actualizar los colores y estilos de las franjas
|
| 106 |
for idx, row in data.iterrows():
|
| 107 |
fig.data[idx].update(marker_color=row['Color'], opacity=row['Opacity'])
|
| 108 |
+
fig.data[idx].update(marker_line=dict(width=row['Border Width'], color=row['Border Color']))
|
| 109 |
|
| 110 |
# Actualizar el diseño del gráfico
|
| 111 |
fig.update_yaxes(categoryorder="total ascending")
|