I have a magneta colored graph made in plotly with certain levels which I have added via vertical lines. Currently I have color filled these areas between the vertical lines.
However I would like to only have a color between the vertical line and the magneta graph (I have circled the aereas as a reference.
Is this possible in plotly?
plot <- plot %>% add_lines(type = 'scatter', mode = "lines",
name = "test", yaxis = 'y2',
x = ~t, y = ~v.x,
line = list(color = '#CC79A7'),
hoverinfo = "text",
text = ~paste(round(v.x, 1), t))
plot <- plot %>% add_segments(x = ~min(t), xend = ~max(t),
y = round(quantNUPL[1], 1), yend = round(quantNUPL[1], 1), yaxis = 'y2',
line= list(color = "#0072B0",
dash = "dash",
width = 1),
showlegend = F)
plot <- plot %>% add_segments(x = ~min(t), xend = ~max(t),
y = round(quantNUPL[2], 1), yend = round(quantNUPL[2], 1), yaxis = 'y2',
line= list(color = "#0072B0",
dash = "dash",
width = 1),
fill = 'tonexty',
fillcolor = '#56B4E940',
name = "90% UPSIDE")
plot <- plot %>% add_segments(x = ~min(t), xend = ~max(t),
y = round(quantNUPL[6], 1), yend = round(quantNUPL[6], 1), yaxis = 'y2',
line= list(color = "#999999",
dash = "dash",
width = 1),
name = "50% UPSIDE")
plot <- plot %>% add_segments(x = ~min(t), xend = ~max(t),
y = round(quantNUPL[9], 1), yend = round(quantNUPL[9], 1), yaxis = 'y2',
line= list(color = "#E69F00",
dash = "dot",
width = 1),
name = "20% UPSIDE",
showlegend = F)
plot <- plot %>% add_segments(x = ~min(t), xend = ~max(t),
y = round(quantNUPL[10], 1), yend = round(quantNUPL[10], 1), yaxis = 'y2',
line= list(color = "#E69F00",
dash = "dash",
width = 1),
fill = 'tonexty',
fillcolor = "#E69F0020",
name = "20% UPSIDE")
plot <- plot %>% add_segments(x = ~min(t), xend = ~max(t),
y = round(quantNUPL[11], 1), yend = round(quantNUPL[11], 1), yaxis = 'y2',
line= list(color = "#E69F00",
dash = "solid",
width = 1),
fill = 'tonexty',
fillcolor = "#E69F0040",
name = "10% UPSIDE")