tests/testthat/test-callbacks.R

context("dyCallbacks")

test_that("callback creation", {
  d <- dygraph(ldeaths) %>% dyCallbacks(clickCallback = "function(e, x, points) {}")
  expect_is(d$x$attrs$clickCallback, "JS_EVAL")
})

Try the dygraphs package in your browser

Any scripts or data that you put into this service are public.

dygraphs documentation built on May 2, 2019, 3:34 p.m.