Hi! I have panel data of mortality rate over time by state of the US as well as a dummy variable for an event that occurred in different states at different times. I was hoping to create line graphs for each state of this rate over time with vertical lines that indicate the event.

so far I have the following code:
twoway line (bipoc_rate year, by(state)), xline(2014, lcolor(red)) ytitle( Opioid Death per 100 000) title(year)
I would like the vertical line to occur when my variable mml equals 1.

Alternatively I could do:
twoway line bipoc_rate year if state==1, xline(2014, lcolor(red)) ytitle(Opioid Induced Death per 100 000) xtitle(Year)
But this would require me individually putting in the state and year that the event occurred.
Please let me know if this is possible or any advice, I am new to stata so anything helps.