tests/testthat/test-legend.R

context("dyLegend")

test_that("legend creation", {
  d <- dygraph(ldeaths) %>% dyLegend(show = "always", hideOnMouseOut = TRUE)
  expect_identical(d$x$attrs$legend, "always")
  expect_identical(d$x$attrs$hideOverlayOnMouseOut, TRUE)
})

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.