Spaces:
Runtime error
Runtime error
James McCool
commited on
Commit
·
8ccdc02
1
Parent(s):
52f0b73
Uncomment x-axis configuration in game rotation timeline plot
Browse files
app.py
CHANGED
@@ -699,8 +699,8 @@ with tab5:
|
|
699 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Resource", range_x=[0,check_rotation["Finish"].max()], text='delta')
|
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="Resource", range_x=[0,check_rotation["Finish"].max()], text='delta')
|
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))
|