@@ -369,47 +369,55 @@ fig.add_trace(
369369 go.Scatter(x = list (df.index),
370370 y = list (df.High),
371371 name = " High" ,
372- line = dict (color = " #33CFA5 " )))
372+ line = dict (color = " MediumSlateBlue " )))
373373
374374fig.add_trace(
375375 go.Scatter(x = list (df.index),
376376 y = [df.High.mean()] * len (df.index),
377377 name = " High Average" ,
378378 visible = False ,
379- line = dict (color = " #33CFA5 " , dash = " dash" )))
379+ line = dict (color = " MediumSlateBlue " , dash = " dash" )))
380380
381381fig.add_trace(
382382 go.Scatter(x = list (df.index),
383383 y = list (df.Low),
384384 name = " Low" ,
385- line = dict (color = " #F06A6A " )))
385+ line = dict (color = " DarkOrange " )))
386386
387387fig.add_trace(
388388 go.Scatter(x = list (df.index),
389389 y = [df.Low.mean()] * len (df.index),
390390 name = " Low Average" ,
391391 visible = False ,
392- line = dict (color = " #F06A6A " , dash = " dash" )))
392+ line = dict (color = " DarkOrange " , dash = " dash" )))
393393
394394# Add Annotations and Buttons
395- high_annotations = [dict (x = " 2016-03-01 " ,
395+ high_annotations = [dict (x = - 0.05 ,
396396 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 ),
400403 dict (x = df.High.idxmax(),
401404 y = df.High.max(),
402- xref = " x" , yref = " y" ,
405+ xref = " x" ,
406+ yref = " y" ,
403407 text = " High Max:<br> %.2f " % df.High.max(),
404408 ax = 0 , ay = - 40 )]
405- low_annotations = [dict (x = " 2015-05-01 " ,
409+ low_annotations = [dict (x = - 0.05 ,
406410 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(),
411418 y = df.Low.min(),
412- xref = " x" , yref = " y" ,
419+ xref = " x" ,
420+ yref = " y" ,
413421 text = " Low Min:<br> %.2f " % df.Low.min(),
414422 ax = 0 , ay = 40 )]
415423
0 commit comments