xiaotongwu05 commited on
Commit
010e3f7
·
verified ·
1 Parent(s): 0ff5947

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -63,7 +63,8 @@ def app():
63
 
64
  # Add value labels on top of bars for countplot with comma formatting
65
  for container in ax.containers:
66
- ax.bar_label(container, fmt='%d', label_type='edge', fontsize=9)
 
67
 
68
  if "Monthly Revenue" in plot["title"]:
69
  sns.lineplot(data=df, x=plot["x"], y=plot["y"], hue=plot["hue"], estimator=plot["estimator"], errorbar=None, marker=plot["marker"], ax=ax)
 
63
 
64
  # Add value labels on top of bars for countplot with comma formatting
65
  for container in ax.containers:
66
+ labels = [f'{int(height):,}' for height in container.datavalues]
67
+ ax.bar_label(container, labels=labels, label_type='edge', fontsize=9)
68
 
69
  if "Monthly Revenue" in plot["title"]:
70
  sns.lineplot(data=df, x=plot["x"], y=plot["y"], hue=plot["hue"], estimator=plot["estimator"], errorbar=None, marker=plot["marker"], ax=ax)