File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ def main(argv=None):
78
78
data = list (load_data (file_in_data ))
79
79
values = load_values (file_in_values )
80
80
81
+ latest_date = data [- 1 ]['date' ]
82
+
81
83
if args .plot_rate :
82
84
fig = px .line (
83
85
data ,
@@ -88,7 +90,7 @@ def main(argv=None):
88
90
)
89
91
fig .add_vline (
90
92
annotation_text = 'today' ,
91
- x = dt .combine (data [ - 1 ][ 'date' ] , dt .min .time ()).timestamp () * 1000 ,
93
+ x = dt .combine (latest_date , dt .min .time ()).timestamp () * 1000 ,
92
94
line_color = '#0cc' ,
93
95
)
94
96
fig .show ()
@@ -118,7 +120,7 @@ def main(argv=None):
118
120
)
119
121
fig .add_vline (
120
122
annotation_text = 'today' ,
121
- x = dt .combine (data [ - 1 ][ 'date' ] , dt .min .time ()).timestamp () * 1000 ,
123
+ x = dt .combine (latest_date , dt .min .time ()).timestamp () * 1000 ,
122
124
line_color = '#0cc' ,
123
125
)
124
126
fig .show ()
@@ -148,7 +150,7 @@ def main(argv=None):
148
150
)
149
151
fig .add_vline (
150
152
annotation_text = 'today' ,
151
- x = dt .combine (data [ - 1 ][ 'date' ] , dt .min .time ()).timestamp () * 1000 ,
153
+ x = dt .combine (latest_date , dt .min .time ()).timestamp () * 1000 ,
152
154
line_color = '#0cc' ,
153
155
)
154
156
fig .show ()
You can’t perform that action at this time.
0 commit comments