Add xref to have the line show up
@@ -206,7 +206,7 @@ def run_sim(sim_pars=None, epi_pars=None, verbose=True):
if len(sim['interv_days']):
interv_day = sim['interv_days'][0]
if interv_day > 0 and interv_day < sim['n_days']:
- fig.add_shape(dict(type="line", yref="paper", x0=interv_day, x1=interv_day, y0=0, y1=1, name='Intervention', line=dict(width=0.5, dash='dash')))
+ fig.add_shape(dict(type="line", xref="x", yref="paper", x0=interv_day, x1=interv_day, y0=0, y1=1, name='Intervention', line=dict(width=0.5, dash='dash')))
fig.update_layout(title={'text':title}, xaxis_title='Day', yaxis_title='Count', autosize=True)
graphs.append({'json':fig.to_json(),'id':str(sc.uuid())})
except Exception as E:
