tests/testthat/test-ggplot-resize.R

test_that("ggplotly shouldn't populate layout.[width/height] by default", {
  lay <- ggplotly(qplot(1:10))$x$layout
  expect_null(lay$height)
  expect_null(lay$width)
})

# TODO: test the functionality client side!

Try the plotly package in your browser

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

plotly documentation built on Nov. 10, 2022, 5:42 p.m.