Spaces:
Runtime error
Runtime error
James McCool
commited on
Commit
·
a60bbb8
1
Parent(s):
5a57605
Modify game rotation timeline plot by commenting out y-axis auto-reversal and adjusting plot creation method
Browse files
app.py
CHANGED
@@ -697,10 +697,15 @@ with tab5:
|
|
697 |
game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
|
698 |
game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
|
699 |
|
700 |
-
|
701 |
-
|
|
|
702 |
|
|
|
|
|
703 |
fig.layout.xaxis.type = 'linear'
|
|
|
|
|
704 |
# Create a color map for each unique player
|
705 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
706 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|
@@ -736,7 +741,7 @@ with tab5:
|
|
736 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
737 |
|
738 |
fig.layout.xaxis.type = 'linear'
|
739 |
-
fig.update_yaxes(autorange="reversed")
|
740 |
|
741 |
fig.add_vline(x=12, line_width=3, line_dash="dash", line_color="green")
|
742 |
fig.add_vline(x=24, line_width=3, line_dash="dash", line_color="green")
|
|
|
697 |
game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
|
698 |
game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
|
699 |
|
700 |
+
x_start_vals = check_rotation['Start'].tolist()
|
701 |
+
x_end_vals = check_rotation['Finish'].tolist()
|
702 |
+
y_vals = check_rotation['Task'].tolist()
|
703 |
|
704 |
+
fig = px.timeline(x_start=x_start_vals, x_end=x_end_vals, y=y_vals, range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
705 |
+
|
706 |
fig.layout.xaxis.type = 'linear'
|
707 |
+
# fig.update_yaxes(autorange="reversed")
|
708 |
+
|
709 |
# Create a color map for each unique player
|
710 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
711 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|
|
|
741 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
742 |
|
743 |
fig.layout.xaxis.type = 'linear'
|
744 |
+
# fig.update_yaxes(autorange="reversed")
|
745 |
|
746 |
fig.add_vline(x=12, line_width=3, line_dash="dash", line_color="green")
|
747 |
fig.add_vline(x=24, line_width=3, line_dash="dash", line_color="green")
|