We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2ceec5 commit aac30a4Copy full SHA for aac30a4
tests/testthat/test-plotly-customdata.R
@@ -0,0 +1,10 @@
1
+context("customdata")
2
+
3
+# TODO: use shinytest to make sure we can access the right value in shiny
4
+test_that("ggplotly relays customdata", {
5
+ nms <- row.names(mtcars)
6
+ p <- ggplot(mtcars, aes(x = mpg, y = wt, customdata = nms)) + geom_point()
7
+ l <- plotly_build(p)
8
+ trace <- l$x$data[[1]]
9
+ expect_equivalent(trace$customdata, nms)
10
+})
0 commit comments