I am having a slight issue with R Shiny dashboards that I hope someone might be able to help me with.
Below is an extract for one of the shiny apps I am working on. On this page there are two panels on the same row side by side, and each panel has two tabs in it, each with their own graph. Each panel has a consistent title, with a slightly different bit in brackets. I have noticed that when I resize the browser window (although R shiny is very good and dynamically changes the plot, text etc to fit the new size) the slightly longer title jumps to the row below the tabPanel()
choices before the shorter title. This causes the two panels to be of differing height in the row and makes it look a bit untidy.
Therefore, is there a way to split the panel title over multiple lines? I have searched for this for a while, and have tried "\n", "\r\n", "|" etc with no luck. Alternatively, if there is another solution to this I would be very happy to hear it.
Thank you for the help, and apologies if the answer is out there and I have just missed it!
fluidRow(
tabBox(
title = "Consistent Title (bit in brackets)",
side = "right",
tabPanel(
"Panel title X",
textOutput("X_total"),
plotOutput("X"),
tags$i("All metrics calculated based on blah.")
),
tabPanel(
"Panel title Y",
textOutput("Y_mean"),
plotOutput("Y"),
tags$i("All metrics calculated based on blah.")
), width = 6),
tabBox(
title = "Consistent Title (longer bit in brackets)",
side = "right",
tabPanel(
"Panel title A",
textOutput("A_total"),
plotOutput("A"),
tags$i("All metrics calculated based on blah.")
),
tabPanel(
"Panel title B",
textOutput("B_total"),
plotOutput("B"),
tags$i("All metrics calculated based on blah.")
), width = 6)
)