19arjun89 commited on
Commit
79f1e8f
·
verified ·
1 Parent(s): 0763cc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -1
app.py CHANGED
@@ -147,17 +147,44 @@ def build_report():
147
  labels_df = map_df.copy()
148
  labels_df["label"] = labels_df["country"] + "<br>" + labels_df["usage events"].astype(str)
149
 
 
 
 
150
  fig.add_trace(
151
  go.Scattergeo(
152
  locations=labels_df["iso3"],
153
  locationmode="ISO-3",
154
  text=labels_df["label"],
155
  mode="text",
156
- textfont=dict(size=11, color="black", family="Arial"),
 
 
 
 
157
  hoverinfo="skip",
158
  showlegend=False,
159
  )
160
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  # Title
163
  fig.add_annotation(
 
147
  labels_df = map_df.copy()
148
  labels_df["label"] = labels_df["country"] + "<br>" + labels_df["usage events"].astype(str)
149
 
150
+ # ===============================
151
+ # Label shadow (dark background)
152
+ # ===============================
153
  fig.add_trace(
154
  go.Scattergeo(
155
  locations=labels_df["iso3"],
156
  locationmode="ISO-3",
157
  text=labels_df["label"],
158
  mode="text",
159
+ textfont=dict(
160
+ size=13, # slightly bigger
161
+ color="black",
162
+ family="Arial",
163
+ ),
164
  hoverinfo="skip",
165
  showlegend=False,
166
  )
167
  )
168
+
169
+ # ===============================
170
+ # Main label (white foreground)
171
+ # ===============================
172
+ fig.add_trace(
173
+ go.Scattergeo(
174
+ locations=labels_df["iso3"],
175
+ locationmode="ISO-3",
176
+ text=labels_df["label"],
177
+ mode="text",
178
+ textfont=dict(
179
+ size=11,
180
+ color="white",
181
+ family="Arial",
182
+ ),
183
+ hoverinfo="skip",
184
+ showlegend=False,
185
+ )
186
+ )
187
+
188
 
189
  # Title
190
  fig.add_annotation(