8000 Add fix to take account of linebreaks in yaxis ticklabels. by trekonom · Pull Request #1791 · plotly/plotly.R · GitHub
[go: up one dir, main page]

Skip to content

Add fix to take account of linebreaks in yaxis ticklabels. #1791

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 5 commits into from
Jun 23, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary sapply.
  • Loading branch information
trekonom committed Jun 17, 2020
commit d441c09cecde1721923ef79d34f59562dfaae61c
2 changes: 1 addition & 1 deletion R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ gg2list <- function(p, width = NULL, height = NULL,
# do some stuff that should be done once for the entire plot
if (i == 1) {
# Split ticktext elements by "\n" to account for linebreaks
axisTickText <- sapply(as.character(axisObj$ticktext), strsplit, split = "\n", USE.NAMES = FALSE)
axisTickText <- strsplit(as.character(axisObj$ticktext), split = "\n")
# Get longest element for each tick
axisTickText <- lapply(axisTickText, longest_element)
# Longest element of all ticks
Expand Down
0