bgbrink
bgbrink

Reputation: 663

Align and format text according to plots in R Shiny

I would like to add descriptive text to my plots in Shiny. I am outputting a dynamic number of plots in two columns and I would like to add a third column, like so:

Example

However, I can't figure out how to align the text with the plots. Can I use CSS containers or div's? HTML codes are working, but hardcoding a bunch of <br/>'s does not seem smart. Here is a minimal example.

Any help is greatly appreciated.

Upvotes: 0

Views: 106

Answers (1)

Xiongbing Jin
Xiongbing Jin

Reputation: 12087

Just change the htmlOutput line to

htmlOutput(plotname, style="height:400px;")

You can use the Inspect Element context menu of Firefox to find out the height for the plots.

Upvotes: 1

Related Questions