tests/testthat/test-tooltip.R

test_that("set_tooltip_fixed works", {
  ax <- apex(
    data = mtcars, 
    mapping = aes(x = cyl),
    type = "column"
  ) %>% 
    set_tooltip_fixed()
  
  expect_is(ax, "apex")
  expect_is(ax$x$ax_opts$tooltip$fixed, "list")
  expect_true(ax$x$ax_opts$tooltip$fixed$enabled)
})
dreamRs/apexcharter documentation built on June 17, 2024, 10:09 p.m.