duongthienz commited on
Commit
14c1415
·
verified ·
1 Parent(s): 02555b7

High x-axis tick value of time spoken graph

Browse files
Files changed (1) hide show
  1. utils.py +3 -5
utils.py CHANGED
@@ -429,11 +429,9 @@ def build_fig_bar(df2, speakerNames, catColors, speakerColors, get_display_name_
429
  title="Time Spoken by each Speaker",
430
  color_discrete_sequence=catColors + speakerColors,
431
  )
432
- # Format x-axis ticks as hh:mm:ss by converting seconds to milliseconds for plotly
433
- fig.update_xaxes(
434
- tickvals=df2["values"].tolist(),
435
- ticktext=df2["time_label"].tolist(),
436
- )
437
  fig.update_yaxes(autorange="reversed")
438
  fig.update_layout(
439
  xaxis_title="Time Spoken",
 
429
  title="Time Spoken by each Speaker",
430
  color_discrete_sequence=catColors + speakerColors,
431
  )
432
+ # Hide x-axis tick labels values are crowded with many speakers.
433
+ # The exact time is still visible on hover via the hovertemplate.
434
+ fig.update_xaxes(showticklabels=False)
 
 
435
  fig.update_yaxes(autorange="reversed")
436
  fig.update_layout(
437
  xaxis_title="Time Spoken",