SHELLAPANDIANGANHUNGING commited on
Commit
4d1bb87
·
verified ·
1 Parent(s): 58f2658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -494,7 +494,7 @@ if 'temuan_kode_distrik' in df_local.columns:
494
 
495
  # 🔥 Tambahkan satu trace untuk setiap perusahaan agar muncul di legend
496
  for i, (comp, ratio, color, angle) in enumerate(zip(companies, ratios, colors, angles)):
497
- fig.add_trace(go.Barpolar(
498
  r=[ratio],
499
  theta=[mid_angles[i]],
500
  width=[angle],
@@ -502,10 +502,10 @@ if 'temuan_kode_distrik' in df_local.columns:
502
  marker_line_color="white",
503
  marker_line_width=1.2,
504
  opacity=0.9,
505
- hovertemplate="<b>%{text}</b><br>Avg Ratio: %{r[0]:.2f}<extra></extra>",
506
  text=[comp],
507
- name=comp, # 🔥 Nama perusahaan untuk legend
508
- showlegend=True # 🔥 Tampilkan di legend
509
  ))
510
 
511
  fig.update_layout(
 
494
 
495
  # 🔥 Tambahkan satu trace untuk setiap perusahaan agar muncul di legend
496
  for i, (comp, ratio, color, angle) in enumerate(zip(companies, ratios, colors, angles)):
497
+ fig.add_trace(go.Barpolar(
498
  r=[ratio],
499
  theta=[mid_angles[i]],
500
  width=[angle],
 
502
  marker_line_color="white",
503
  marker_line_width=1.2,
504
  opacity=0.9,
505
+ hovertemplate="<b>%{text}</b><br>Avg Ratio: %{r:.2f}<extra></extra>", # 🔥 Hapus [0]
506
  text=[comp],
507
+ name=comp,
508
+ showlegend=True
509
  ))
510
 
511
  fig.update_layout(