tx3bas commited on
Commit
39b6bd7
路
verified 路
1 Parent(s): c78abd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -150,10 +150,10 @@ else:
150
  fig = px.bar(data, x="X", y=y_names_list, barmode='stack' if stacked_bars else 'group')
151
  fig.update_traces(hovertemplate=hovertemplate)
152
  if use_multiple_colors:
153
- for i in range(len(data)):
154
- fig.data[i].marker.color = colors[i % len(colors)]
155
- fig.data[i].marker.line.color = border_colors[i % len(border_colors)]
156
- fig.data[i].marker.line.width = border_width
157
  else:
158
  fig.update_traces(marker_color=color, marker_line_color=border_color, marker_line_width=border_width)
159
  fig.update_layout(bargap=0.2)
@@ -216,4 +216,4 @@ else:
216
 
217
  # Informaci贸n adicional
218
  st.write("""
219
- """)
 
150
  fig = px.bar(data, x="X", y=y_names_list, barmode='stack' if stacked_bars else 'group')
151
  fig.update_traces(hovertemplate=hovertemplate)
152
  if use_multiple_colors:
153
+ for i, trace in enumerate(fig.data):
154
+ trace.marker.color = colors[i % len(colors)]
155
+ trace.marker.line.color = border_colors[i % len(border_colors)]
156
+ trace.marker.line.width = border_width
157
  else:
158
  fig.update_traces(marker_color=color, marker_line_color=border_color, marker_line_width=border_width)
159
  fig.update_layout(bargap=0.2)
 
216
 
217
  # Informaci贸n adicional
218
  st.write("""
219
+ """)