Spaces:
Build error
Build error
James McCool
commited on
Commit
·
c21d0ff
1
Parent(s):
f14b361
Improve game rotation timeline plot with enhanced x-axis configuration and layout
Browse files
app.py
CHANGED
|
@@ -700,8 +700,14 @@ with tab5:
|
|
| 700 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
| 701 |
fig.update_yaxes(autorange="reversed")
|
| 702 |
|
| 703 |
-
|
| 704 |
-
fig.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 705 |
# Create a color map for each unique player
|
| 706 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
| 707 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|
|
|
|
| 700 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
| 701 |
fig.update_yaxes(autorange="reversed")
|
| 702 |
|
| 703 |
+
# Configure the layout
|
| 704 |
+
fig.update_layout(
|
| 705 |
+
xaxis=dict(
|
| 706 |
+
title="Game Time (Minutes)",
|
| 707 |
+
tickmode='linear',
|
| 708 |
+
dtick=6
|
| 709 |
+
)
|
| 710 |
+
)
|
| 711 |
# Create a color map for each unique player
|
| 712 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
| 713 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|