Hi all,
I’m trying to use add_segments to overlay a shading pattern on top of certain existing segments but despite the nice list of attributes reported, fillpattern and even line get ignored.
Sample list of parameters fed to add_segments below. Am I doing it wrong or are these not yet implemented or something?
mode = "lines+markers",
line = list(width = I(3),
shape = "vhv",
dot = "dot"),
fill = "toself",
fillpattern = list(shape = "x",
fillmode = "overlay",
fgopacity = I(0.2),
fgcolor = I("black"),
size = I(1))
Thanks!
Sample output and code below.
swimplotb ← ggplotly(swimplot, tooltip = c(“text”), height = calculatedHeight) %>% add_segments(data = modifiedAEREL, y = ~AETYPENUMBER, yend = ~AETYPENUMBER, x = ~MODIFIED_AESTDY, xend = ~MODIFIED_AEENDY, fill = “toself”, showlegend = FALSE, mode=“lines”, line=list(shape = “hv”, width=“3”, shape = “dot”), color=I(“black”), fillpattern = list(fillmode = “overlay”, shape = “/”)) %>% layout(annotations = c(listOfArrows, list(list(x=0,y=1,text = “Adverse events”, xref = “paper”, yref = “paper”, xanchor = “left”, yanchor = “bottom”, showarrow = FALSE))), legend = list(title = “”, orientation = “h”, xref = “container”, yref = “container”, xanchor = “center”, x = 0.5, y = -2, yanchor = “top”, font = list(size = “7”)))