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)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.