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)
})
rstudio/dygraphs documentation built on March 17, 2023, 10:48 a.m.