Skip to content

Commit 5d7a662

Browse files
authored
Merge pull request #11 from fenguoerbian/fix-hjust
`hjust` in `element_text` only accepts numerical value
2 parents 00861ef + 87ae04f commit 5d7a662

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

inst/app/server/graph-output.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ plotInput <- reactive({
5353
caption = stringi::stri_unescape_unicode(input$plotCaption)
5454
) +
5555
ggplot2::theme(
56-
plot.title = ggplot2::element_text(size = input$title.textsize, hjust = input$title.position),
57-
plot.caption = ggplot2::element_text(size = input$caption.textsize, hjust = input$caption.position)
56+
plot.title = ggplot2::element_text(size = input$title.textsize, hjust = as.numeric(input$title.position)),
57+
plot.caption = ggplot2::element_text(size = input$caption.textsize, hjust = as.numeric(input$caption.position))
5858
)
5959
})
6060

0 commit comments

Comments
 (0)