QuantumLearner commited on
Commit
5a2287f
·
verified ·
1 Parent(s): bc75804

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -84,8 +84,8 @@ def plot_stock_price_with_earnings(stock_data, earnings_dates, ticker):
84
  """
85
  fig = go.Figure()
86
  fig.add_trace(go.Scatter(x=stock_data.index, y=stock_data['Close'], mode='lines', name='Stock Price', line=dict(color='blue')))
87
- scaling_factor = 150
88
- max_marker_size = 100 # Limit the maximum marker size
89
  added_positive_legend = False
90
  added_negative_legend = False
91
 
@@ -109,7 +109,7 @@ def plot_stock_price_with_earnings(stock_data, earnings_dates, ticker):
109
  added_negative_legend = True
110
 
111
  fig.add_trace(go.Scatter(x=[date], y=[stock_data.loc[date, 'Close']], mode='markers',
112
- marker=dict(symbol='triangle-up' if marker == '^' else 'triangle-down', size=1 if name is not None else marker_size, color=color),
113
  name=name, showlegend=name is not None))
114
 
115
  fig.update_layout(title=f'{ticker} Stock Price with Earnings Surprise',
 
84
  """
85
  fig = go.Figure()
86
  fig.add_trace(go.Scatter(x=stock_data.index, y=stock_data['Close'], mode='lines', name='Stock Price', line=dict(color='blue')))
87
+ scaling_factor = 15
88
+ max_marker_size = 50 # Limit the maximum marker size
89
  added_positive_legend = False
90
  added_negative_legend = False
91
 
 
109
  added_negative_legend = True
110
 
111
  fig.add_trace(go.Scatter(x=[date], y=[stock_data.loc[date, 'Close']], mode='markers',
112
+ marker=dict(symbol='triangle-up' if marker == '^' else 'triangle-down', size=10 if name is not None else marker_size, color=color),
113
  name=name, showlegend=name is not None))
114
 
115
  fig.update_layout(title=f'{ticker} Stock Price with Earnings Surprise',