Tutuchan / chartjs

An implementation of the Chart.js library in R
MIT License
30 stars 7 forks source link

Time scale does not handle series starting with NA values #13

Open Tutuchan opened 7 years ago

Tutuchan commented 7 years ago
chartjs(height = "200px") %>%
  cjsLine(labels = seq.Date(as.Date("2011-01-01"), as.Date("2011-01-08"), by = 1)) %>%
  cjsEditScale("x", 1, type = "time") %>% 
  cjsEditScale("y", 1, type = "logarithmic") %>%
  cjsSeries(data = abs(c(rnorm(8))), label = "Series 1") %>%
  cjsSeries(data = c(NA, NA, abs(c(rnorm(1))), NA, abs(c(rnorm(4)))), label = "Series 2") %>%
  cjsSeries(data = abs(c(rnorm(8))), label = "Series 3") %>% 
  cjsLegend()