Spaces:
Running
Running
gauravlochab
commited on
Commit
•
15963b4
1
Parent(s):
af08225
Adjust x-axis tick angle, bar gap, and date formatting in visualizations
Browse files
app.py
CHANGED
@@ -139,7 +139,7 @@ def create_visualizations():
|
|
139 |
swaps_per_chain,
|
140 |
x="date",
|
141 |
y="swap_count",
|
142 |
-
color="
|
143 |
title="Chain Daily Activity: Swaps",
|
144 |
labels={"sending_chain": "Transaction Chain", "swap_count": "Daily Swap Nr"},
|
145 |
barmode="stack"
|
@@ -167,7 +167,7 @@ def create_visualizations():
|
|
167 |
bridges_per_chain,
|
168 |
x="date",
|
169 |
y="bridge_count",
|
170 |
-
color="
|
171 |
title="Chain Daily Activity: Bridges",
|
172 |
labels={"bridge_count": "Daily Bridge Nr"},
|
173 |
barmode="stack"
|
@@ -191,19 +191,14 @@ def create_visualizations():
|
|
191 |
investment_per_agent,
|
192 |
x="date",
|
193 |
y="sending_amount_usd",
|
194 |
-
color="
|
195 |
title="Amount of Investment (USD) per Day",
|
196 |
labels={"sending_amount_usd": "Investment Amount (USD)"},
|
197 |
barmode="stack"
|
198 |
)
|
199 |
fig_investment_agent.update_layout(
|
200 |
xaxis_title=None,
|
201 |
-
yaxis=dict(
|
202 |
-
title="Investment Amount (USD)",
|
203 |
-
tickmode='auto',
|
204 |
-
nticks=10,
|
205 |
-
tickformat='.2f' # Show 2 decimal places
|
206 |
-
),
|
207 |
xaxis=dict(
|
208 |
tickmode='array',
|
209 |
tickvals=investment_per_agent['date'],
|
|
|
139 |
swaps_per_chain,
|
140 |
x="date",
|
141 |
y="swap_count",
|
142 |
+
color="sending_chain",
|
143 |
title="Chain Daily Activity: Swaps",
|
144 |
labels={"sending_chain": "Transaction Chain", "swap_count": "Daily Swap Nr"},
|
145 |
barmode="stack"
|
|
|
167 |
bridges_per_chain,
|
168 |
x="date",
|
169 |
y="bridge_count",
|
170 |
+
color="sending_chain",
|
171 |
title="Chain Daily Activity: Bridges",
|
172 |
labels={"bridge_count": "Daily Bridge Nr"},
|
173 |
barmode="stack"
|
|
|
191 |
investment_per_agent,
|
192 |
x="date",
|
193 |
y="sending_amount_usd",
|
194 |
+
color="sending_chain",
|
195 |
title="Amount of Investment (USD) per Day",
|
196 |
labels={"sending_amount_usd": "Investment Amount (USD)"},
|
197 |
barmode="stack"
|
198 |
)
|
199 |
fig_investment_agent.update_layout(
|
200 |
xaxis_title=None,
|
201 |
+
yaxis=dict(tickmode='linear', tick0=0, dtick=1),
|
|
|
|
|
|
|
|
|
|
|
202 |
xaxis=dict(
|
203 |
tickmode='array',
|
204 |
tickvals=investment_per_agent['date'],
|