jofaichow commited on
Commit
ee096a2
1 Parent(s): b6ac129

simplified facet settings

Browse files
Files changed (1) hide show
  1. app/app.R +3 -15
app/app.R CHANGED
@@ -746,22 +746,10 @@ server <- function(input, output) {
746
  ylab("Realised / Pending Payout (NMR)")
747
 
748
  # Facet setting
749
- if (n_model %% 5 == 0) {
750
-
751
- if (input$switch_scale_payout) {
752
- p <- p + facet_wrap(. ~ model, ncol = 5, scales = "fixed")
753
- } else {
754
- p <- p + facet_wrap(. ~ model, ncol = 5, scales = "free_y")
755
- }
756
-
757
  } else {
758
-
759
- if (input$switch_scale_payout) {
760
- p <- p + facet_wrap(. ~ model, scales = "fixed")
761
- } else {
762
- p <- p + facet_wrap(. ~ model, scales = "free_y")
763
- }
764
-
765
  }
766
 
767
  # Dynamic height adjustment
 
746
  ylab("Realised / Pending Payout (NMR)")
747
 
748
  # Facet setting
749
+ if (input$switch_scale_payout) {
750
+ p <- p + facet_wrap(. ~ model, ncol = 5, scales = "fixed")
 
 
 
 
 
 
751
  } else {
752
+ p <- p + facet_wrap(. ~ model, ncol = 5, scales = "free_y")
 
 
 
 
 
 
753
  }
754
 
755
  # Dynamic height adjustment