Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
| 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)
|