BaşlayınÜcretsiz Başlayın

The body, and completing the UI

You have set up the header and sidebar Now, you can set up the body.

This is a crucial part of the wireframing process, since it will help you decide where to position your outputs and inputs in their desired positions within the main body of the dashboard.

In this exercise, you will place several outputs and inputs in the dashboard. In doing so, you will obtain all three components of the user interface, which will be put together in dashboardPage().

Bu egzersiz

Building Dashboards with shinydashboard

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

header <- dashboardHeader(title = "Soccer tournament")

sidebar <- dashboardSidebar(
  sidebarMenu(
    menuItem("Matches", tabName = "matchtab", icon = icon("futbol")), 
    menuItem("General statistics", tabName = "statstab", icon = icon("chart-line")) 
  )
)

body <- dashboardBody(tabItems(
  tabItem(tabName = "matchtab", 
  fluidRow(selectInput("match", "Match number", choices = 1:nrow(soccer))) 
         ),
  # See that the second tab should contain three sub-tabs
  ___(tabName = ___, 
          ___(tabPanel("Goals"), 
                 ___("Yellow cards"),
                 ___(___))
         )
))
Kodu Düzenle ve Çalıştır