Spaces:
Runtime error
Runtime error
James McCool
commited on
Commit
·
bc1a1c1
1
Parent(s):
c21d0ff
Refactor game rotation timeline plot data and axis configuration
Browse files
app.py
CHANGED
@@ -700,14 +700,10 @@ 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 |
-
|
706 |
-
|
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))
|
|
|
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 |
+
fig.layout.xaxis.type = 'linear'
|
704 |
+
fig.data[0].x = check_rotation.Start.tolist()
|
705 |
+
fig.data[1].x = check_rotation.Finish.tolist()
|
706 |
+
fig.data[0].y = check_rotation.Task.tolist()
|
|
|
|
|
|
|
|
|
707 |
# Create a color map for each unique player
|
708 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
709 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|