fdaudens HF Staff commited on
Commit
0dae655
·
verified ·
1 Parent(s): c13b993

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -118,7 +118,7 @@ def create_stats_html():
118
  text=type_dist['downloads_30d'].apply(format_number) # Add value labels
119
  )
120
 
121
- # Update layout for better readability
122
  fig_types.update_traces(textposition='outside')
123
  fig_types.update_layout(
124
  uniformtext_minsize=8,
@@ -126,7 +126,11 @@ def create_stats_html():
126
  xaxis_tickangle=0,
127
  yaxis_title="Downloads",
128
  plot_bgcolor='white',
129
- bargap=0.3
 
 
 
 
130
  )
131
 
132
  else:
 
118
  text=type_dist['downloads_30d'].apply(format_number) # Add value labels
119
  )
120
 
121
+ # Update layout for better readability and fix y-axis
122
  fig_types.update_traces(textposition='outside')
123
  fig_types.update_layout(
124
  uniformtext_minsize=8,
 
126
  xaxis_tickangle=0,
127
  yaxis_title="Downloads",
128
  plot_bgcolor='white',
129
+ bargap=0.3,
130
+ yaxis=dict(
131
+ type='log', # Use log scale for better visualization
132
+ range=[0, np.log10(type_dist['downloads_30d'].max() * 1.2)], # Add some padding at the top
133
+ )
134
  )
135
 
136
  else: