Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Translate \n to <br /> in fct labels, too #1700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 22, 2020
Prev Previous commit
Next Next commit
replace forcats code with base R
  • Loading branch information
salim-b committed May 21, 2020
commit 67c8f125e68e49cd55c4ee4062db8293c50b2f40
7 changes: 2 additions & 5 deletions 7 tests/testthat/test-plotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,6 @@ test_that("toWebGL() shouldn't complain if it's already webgl", {
})

test_that("Line breaks are properly translated (R -> HTML)", {
skip_if_not_installed(pkg = "forcats")

# create target labels
suffix <- "\n\n(third line)\n(fourth line)"

Expand All @@ -333,9 +331,8 @@ test_that("Line breaks are properly translated (R -> HTML)", {
fixed = TRUE)

# test factor column
d <- iris %>% dplyr::mutate(Species = forcats::fct_relabel(Species,
paste0,
suffix))
d <- iris
levels(d$Species) <- paste0(levels(d$Species), suffix)
p1 <- d %>% plot_ly(x = ~Sepal.Length,
y = ~Species)

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.