@@ -26,38 +26,48 @@ server <- function(input, output, session) {
2626    gridstack(
2727      margin  =  " 10px"  ,
2828      cellHeight  =  " 140px"  ,
29-       column  =  1 ,
29+       column  =  3 ,
3030      options  =  list (
3131        acceptWidgets  =  TRUE ,
3232        dragOut  =  TRUE 
3333      ),
34-       gs_item(value_box(
35-         title  =  " Customer lifetime value"  ,
36-         value  =  " $5,000"  ,
37-         showcase  =  icon(" bank"  ),
38-         theme  =  " text-success"  ,
39-         class  =  " mb-0" 
40-       )),
41-       gs_item(value_box(
42-         title  =  " Customer lifetime value"  ,
43-         value  =  " $5,000"  ,
44-         showcase  =  icon(" bank"  ),
45-         theme  =  value_box_theme(bg  =  " #e6f2fd"  , fg  =  " #0B538E"  ),
46-         class  =  " border mb-0" 
47-       )),
4834      gs_item(
35+         w  =  3 ,
36+         value_box(
37+           title  =  " Customer lifetime value"  ,
38+           value  =  " $5,000"  ,
39+           showcase  =  icon(" bank"  ),
40+           theme  =  " text-success"  ,
41+           class  =  " mb-0" 
42+         )
43+       ),
44+       gs_item(
45+         w  =  3 ,
46+         value_box(
47+           title  =  " Customer lifetime value"  ,
48+           value  =  " $5,000"  ,
49+           showcase  =  icon(" bank"  ),
50+           theme  =  value_box_theme(bg  =  " #e6f2fd"  , fg  =  " #0B538E"  ),
51+           class  =  " border mb-0" 
52+         )
53+       ),
54+       gs_item(
55+         w  =  3 ,
4956        plotOutput(" plot1"  , height  =  " 100%"  ),
5057        class_content  =  " bg-white p-2 border rounded-4" 
5158      ),
5259      gs_item(
60+         w  =  3 ,
5361        plotOutput(" plot2"  , height  =  " 100%"  ),
5462        class_content  =  " bg-white p-2 border rounded-4" 
5563      ),
5664      gs_item(
65+         w  =  3 ,
5766        plotOutput(" plot3"  , height  =  " 100%"  ),
5867        class_content  =  " bg-white p-2 border rounded-4" 
5968      ),
6069      gs_item(
70+         w  =  3 ,
6171        plotOutput(" plot4"  , height  =  " 100%"  ),
6272        class_content  =  " bg-white p-2 border rounded-4" 
6373      )
@@ -67,6 +77,7 @@ server <- function(input, output, session) {
6777  output $ grid2  <-  renderGridstack({
6878    gridstack(
6979      minRow  =  3 ,
80+       column  =  6 ,
7081      cellHeight  =  " 140px"  ,
7182      options  =  list (
7283        acceptWidgets  =  TRUE ,
@@ -78,7 +89,6 @@ server <- function(input, output, session) {
7889  output $ plot1  <-  renderPlot({
7990    ggplot(mtcars ) +  geom_point(aes(mpg , disp ))
8091  })
81-   outputOptions(output , " plot1"  , suspendWhenHidden  =  TRUE )
8292  output $ plot2  <-  renderPlot({
8393    ggplot(mtcars ) +  geom_boxplot(aes(gear , disp , group  =  gear ))
8494  })
0 commit comments