I am looking for some help to add a horizontal line in the plotly graph. I tried using add_trace(y=75000000, mode="line") command. But the problem is the lines are coming as legend for all the regions given in the color command. My code looks like below.
plot_ly(limit, x = ~cycle_Report, y = ~Amount,color = ~Region, colors = c('#BF382A', '#0C4B8E')) %>%
add_markers() %>%
#geom_hline(aes(y=75000000)) %>%
add_trace(y=75000000,mode ='lines', color = list('red')%>%
layout(scene = list(xaxis = list(title = 'cycle Report'),
yaxis = list(title = 'cycle Amount')))
I simply need to add a horizontal line at 75000000 in y-axis with Red color and the text for that line without forming separate legends.