Closed pro100mir closed 5 years ago
Hello Mircea,
Yes that's possible, here some examples :
library(billboarder)
mydata <- data.frame(
index = seq_len(100),
Sine = sin(1:100/10),
Cosine = 0.5 * cos(1:100/10),
"Sine.2" = sin(1:100/10) * 0.25 + 0.5
)
# Without mapping
billboarder() %>%
bb_linechart(data = mydata, type = "spline") %>%
bb_point(show = TRUE) %>%
bb_line(point = c("Cosine", "Sine.2"))
# with mapping and one serie
billboarder() %>%
bb_linechart(
data = mydata,
mapping = bbaes(index, Cosine), type = "line"
) %>%
bb_point(show = TRUE) %>%
bb_line(point = TRUE)
# with mapping and multiple series
mydata2 <- tidyr::gather(data = mydata, "variable", "value", -index)
billboarder() %>%
bb_linechart(
data = mydata2,
mapping = bbaes(index, value, group = variable),
type = "line"
) %>%
bb_point(show = TRUE) %>%
bb_line(point = c("Cosine", "Sine.2"))
Victor
Thanks a lot!
Hi
Is it possible to have on a bb_linechart data1 having points showed and data2 points not showed? Similar like in this example: https://naver.github.io/billboard.js/demo/#LineChartOptions.LinePoint
Thank you, Mircea