We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c89d84f commit 6e1f979Copy full SHA for 6e1f979
tests/testthat/test-ggplot-color.R
@@ -0,0 +1,10 @@
1
+df = data.frame(width = 1:3, height = 1:3, col = letters[1:3])
2
+test_that("ggplotly automatically converts `color` aes to `colour`", {
3
+ ggpenguins <- qplot(width, height,
4
+ data = df, color = col)
5
+ # color variable is not shown
6
+ color <- plotly_build(ggplotly(ggpenguins, tooltip = c("color")))
7
+ # colour (with u!) variable is shown
8
+ expect_identical(color$x$data, plotly_build(ggplotly(ggpenguins, tooltip = c("colour")))$x$data)
9
+})
10
+
0 commit comments