James McCool commited on
Commit
642608b
·
1 Parent(s): 28ae670
Files changed (1) hide show
  1. app.py +4 -12
app.py CHANGED
@@ -696,8 +696,10 @@ with tab5:
696
  game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
697
 
698
  fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
699
- fig.update_yaxes(autorange="reversed")
700
 
 
 
701
  # Create a color map for each unique player
702
  player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
703
  color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
@@ -709,17 +711,7 @@ with tab5:
709
  fig.add_vline(x=12, line_width=3, line_dash="dash", line_color="green")
710
  fig.add_vline(x=24, line_width=3, line_dash="dash", line_color="green")
711
  fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
712
-
713
- # Configure the layout
714
- fig.update_layout(
715
- xaxis=dict(
716
- title="Game Time (Minutes)",
717
- range=[0, check_rotation["Finish"].max()],
718
- tickmode='linear',
719
- dtick=6
720
- )
721
- )
722
-
723
  display.plotly_chart(fig, use_container_width=True)
724
  stats_disp.dataframe(game_rot_stats.style.format(precision=2), hide_index=True, use_container_width = True)
725
 
 
696
  game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
697
 
698
  fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
699
+ fig.update_yaxes(autorange="reversed")
700
 
701
+ fig.layout.xaxis.type = 'linear'
702
+ fig.data[0].x = check_rotation.delta.tolist()
703
  # Create a color map for each unique player
704
  player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
705
  color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
 
711
  fig.add_vline(x=12, line_width=3, line_dash="dash", line_color="green")
712
  fig.add_vline(x=24, line_width=3, line_dash="dash", line_color="green")
713
  fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
714
+ # pages = pages.set_index('Player')
 
 
 
 
 
 
 
 
 
 
715
  display.plotly_chart(fig, use_container_width=True)
716
  stats_disp.dataframe(game_rot_stats.style.format(precision=2), hide_index=True, use_container_width = True)
717