streamgraph icon indicating copy to clipboard operation
streamgraph copied to clipboard

Continous data gives problems with sg_title, sg_annotate, and sg_add_marker

Open Alexander-Kahanek opened this issue 5 years ago • 0 comments

When using the continuous data option, it runs into the following problems:

  • The sg_title() function does not seem to work, and actually adjusts the plot size.
  • The sg_annotate() function does not work.

Also, my package cannot find the sg_add_marker() function, although it is mentioned as being functional.

Here is my code for replication:

temp <- data.frame("type"= letters[1:10], "id"= 1:10, "data"= 1:10)

streamgraph(temp, "type", "data", "id",
            interpolate="cardinal", scale = "continuous", width="800px") %>% 
  sg_legend(show=TRUE, label="Collection ID: ") %>% 
  sg_fill_brewer("RdPu") %>% 
  sg_title("test") %>% # does not work
  sg_annotate("test",2,2) # %>% sg_add_marker("test", x=7) # both do not work

EDIT: Scratch that, the annotate works, I was just not passing in x and y correctly. However, It will draw if I pass in "[number]px" to x and y, but changing the number does not change the position in the graph.

Alexander-Kahanek avatar Jun 07 '20 04:06 Alexander-Kahanek