Spaces:
Runtime error
Runtime error
James McCool
commited on
Commit
·
c088711
1
Parent(s):
dc4d16b
Update game rotation timeline x-axis configuration and data mapping
Browse files
app.py
CHANGED
@@ -699,8 +699,8 @@ with tab5:
|
|
699 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="PLAYER_NAME", range_x=[0,check_rotation["Finish"].max()])
|
700 |
# fig.update_yaxes(autorange="reversed")
|
701 |
|
702 |
-
|
703 |
-
|
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))
|
|
|
699 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="PLAYER_NAME", range_x=[0,check_rotation["Finish"].max()])
|
700 |
# fig.update_yaxes(autorange="reversed")
|
701 |
|
702 |
+
fig.layout.xaxis.type = 'linear'
|
703 |
+
fig.data[0].x = check_rotation.delta.tolist()
|
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))
|