Spaces:
Sleeping
Sleeping
Commit
·
0531bf9
1
Parent(s):
4138f00
Update app.py
Browse files
app.py
CHANGED
@@ -41,8 +41,8 @@ fig.update_xaxes(ticks= "outside",
|
|
41 |
tickformat="%b",
|
42 |
tickcolor= "black",
|
43 |
ticklen=10,
|
44 |
-
range=[datetime.datetime(
|
45 |
-
|
46 |
minor=dict(
|
47 |
ticklen=4,
|
48 |
dtick=7*24*60*60*1000,
|
@@ -51,16 +51,13 @@ fig.update_xaxes(ticks= "outside",
|
|
51 |
gridcolor='white')
|
52 |
)
|
53 |
|
54 |
-
# Set range
|
55 |
-
fig.update_layout(xaxis_range=[datetime.datetime(2022, 12, 30),
|
56 |
-
datetime.datetime(2023, 4, 2)])
|
57 |
fig.update_yaxes(automargin=True) # fix margins
|
58 |
fig.layout.xaxis.rangeselector = None # remove range selector on top
|
59 |
|
60 |
fig.add_vline(x=datetime.datetime.now().strftime('%Y-%m-%d'), line_width=3, line_dash="dash", line_color="black")
|
61 |
fig.add_annotation({
|
62 |
"x": datetime.datetime.now().strftime('%Y-%m-%d'),
|
63 |
-
"y":
|
64 |
"text": "Today",
|
65 |
"align": "center",
|
66 |
"showarrow": False,
|
|
|
41 |
tickformat="%b",
|
42 |
tickcolor= "black",
|
43 |
ticklen=10,
|
44 |
+
range=[datetime.datetime(2022, 12, 30),
|
45 |
+
datetime.datetime(2023, 4, 2)]],
|
46 |
minor=dict(
|
47 |
ticklen=4,
|
48 |
dtick=7*24*60*60*1000,
|
|
|
51 |
gridcolor='white')
|
52 |
)
|
53 |
|
|
|
|
|
|
|
54 |
fig.update_yaxes(automargin=True) # fix margins
|
55 |
fig.layout.xaxis.rangeselector = None # remove range selector on top
|
56 |
|
57 |
fig.add_vline(x=datetime.datetime.now().strftime('%Y-%m-%d'), line_width=3, line_dash="dash", line_color="black")
|
58 |
fig.add_annotation({
|
59 |
"x": datetime.datetime.now().strftime('%Y-%m-%d'),
|
60 |
+
"y": fig.layout.xaxis.range[1] + 0.1,
|
61 |
"text": "Today",
|
62 |
"align": "center",
|
63 |
"showarrow": False,
|