Spaces:
Build error
Build error
James McCool
commited on
Commit
·
90028db
1
Parent(s):
da67115
Update game rotation timeline plot to use delta column and set x-axis as categorical
Browse files
app.py
CHANGED
|
@@ -703,10 +703,10 @@ with tab5:
|
|
| 703 |
fig = px.timeline(data_frame=check_rotation, x_start='Start', x_end='Finish', y='Resource', range_x=[0,check_rotation["Finish"].max()], text='Task')
|
| 704 |
|
| 705 |
fig.layout.xaxis.type = 'linear'
|
| 706 |
-
fig.data[0].
|
| 707 |
-
fig.data[0].x_end = check_rotation.Finish.tolist()
|
| 708 |
fig.data[0].y = check_rotation.Task.tolist()
|
| 709 |
fig.update_yaxes(autorange="reversed")
|
|
|
|
| 710 |
|
| 711 |
# Create a color map for each unique player
|
| 712 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
|
|
|
| 703 |
fig = px.timeline(data_frame=check_rotation, x_start='Start', x_end='Finish', y='Resource', range_x=[0,check_rotation["Finish"].max()], text='Task')
|
| 704 |
|
| 705 |
fig.layout.xaxis.type = 'linear'
|
| 706 |
+
fig.data[0].x = check_rotation.delta.tolist()
|
|
|
|
| 707 |
fig.data[0].y = check_rotation.Task.tolist()
|
| 708 |
fig.update_yaxes(autorange="reversed")
|
| 709 |
+
fig.update_layout(xaxis=dict(type='category'))
|
| 710 |
|
| 711 |
# Create a color map for each unique player
|
| 712 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|