@@ -369,47 +369,55 @@ fig.add_trace(
369
369
go.Scatter(x = list (df.index),
370
370
y = list (df.High),
371
371
name = " High" ,
372
- line = dict (color = " #33CFA5 " )))
372
+ line = dict (color = " MediumSlateBlue " )))
373
373
374
374
fig.add_trace(
375
375
go.Scatter(x = list (df.index),
376
376
y = [df.High.mean()] * len (df.index),
377
377
name = " High Average" ,
378
378
visible = False ,
379
- line = dict (color = " #33CFA5 " , dash = " dash" )))
379
+ line = dict (color = " MediumSlateBlue " , dash = " dash" )))
380
380
381
381
fig.add_trace(
382
382
go.Scatter(x = list (df.index),
383
383
y = list (df.Low),
384
384
name = " Low" ,
385
- line = dict (color = " #F06A6A " )))
385
+ line = dict (color = " DarkOrange " )))
386
386
387
387
fig.add_trace(
388
388
go.Scatter(x = list (df.index),
389
389
y = [df.Low.mean()] * len (df.index),
390
390
name = " Low Average" ,
391
391
visible = False ,
392
- line = dict (color = " #F06A6A " , dash = " dash" )))
392
+ line = dict (color = " DarkOrange " , dash = " dash" )))
393
393
394
394
# Add Annotations and Buttons
395
- high_annotations = [dict (x = " 2016-03-01 " ,
395
+ high_annotations = [dict (x = - 0.05 ,
396
396
y = df.High.mean(),
397
- xref = " x" , yref = " y" ,
398
- text = " High Average:<br> %.2f " % df.High.mean(),
399
- ax = 0 , ay = - 40 ),
397
+ xanchor = " right" ,
398
+ yanchor = " bottom" ,
399
+ xref = " x domain" ,
400
+ yref = " y" ,
401
+ text = " High Avg:<br> %.2f " % df.High.mean(),
402
+ showarrow = False ),
400
403
dict (x = df.High.idxmax(),
401
404
y = df.High.max(),
402
- xref = " x" , yref = " y" ,
405
+ xref = " x" ,
406
+ yref = " y" ,
403
407
text = " High Max:<br> %.2f " % df.High.max(),
404
408
ax = 0 , ay = - 40 )]
405
- low_annotations = [dict (x = " 2015-05-01 " ,
409
+ low_annotations = [dict (x = - 0.05 ,
406
410
y = df.Low.mean(),
407
- xref = " x" , yref = " y" ,
408
- text = " Low Average:<br> %.2f " % df.Low.mean(),
409
- ax = - 40 , ay = 40 ),
410
- dict (x = df.High.idxmin(),
411
+ xanchor = " right" ,
412
+ yanchor = " top" ,
413
+ xref = " x domain" ,
414
+ yref = " y" ,
415
+ text = " Low Avg:<br> %.2f " % df.Low.mean(),
416
+ showarrow = False ),
417
+ dict (x = df.Low.idxmin(),
411
418
y = df.Low.min(),
412
- xref = " x" , yref = " y" ,
419
+ xref = " x" ,
420
+ yref = " y" ,
413
421
text = " Low Min:<br> %.2f " % df.Low.min(),
414
422
ax = 0 , ay = 40 )]
415
423
0 commit comments