hrbrmstr / streamgraph

:wavy_dash: htmlwidget for creating streamgraph visualizations in R
http://hrbrmstr.github.io/streamgraph/
Other
148 stars 49 forks source link

Continous data gives problems with sg_title, sg_annotate, and sg_add_marker #39

Open Alexander-Kahanek opened 4 years ago

Alexander-Kahanek commented 4 years ago

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

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.