Code Monkey home page Code Monkey logo

Comments (4)

wch avatar wch commented on August 22, 2024 5

I think you need to wrap the menuItems in sidebarMenu(), like so:

  dashboardSidebar(
    sidebarMenu(
      menuItem("foo", tabName = "foo", icon = icon("dashboard")),
      menuItem("bar", tabName = "bar", icon = icon("th")),
      menuItem("baz", tabName = "baz", icon = icon("th"))
    )
  )

from shinydashboard.

wch avatar wch commented on August 22, 2024

Can you provide a small reproducible example?

from shinydashboard.

geoHeil avatar geoHeil commented on August 22, 2024

Hi here it is:

UI .r

library(shiny)
library(shinydashboard)

dashboardPage(
dashboardHeader(title = "hello world"),
dashboardSidebar(

menuItem("foo", tabName = "foo", icon = icon("dashboard")),
menuItem("bar", tabName = "bar", icon = icon("th")),
menuItem("baz", tabName = "baz", icon = icon("th"))

),
dashboardBody(

tabItems(
  # First tab content
  tabItem(tabName = "foo",
          h2("asdfsd!")
  ),
          # Second tab content
  tabItem(tabName = "bar",
                  h2("To be done"),
                  infoBox("New kkkkkk", 10 * 2, icon = icon("credit-card"))
  ),
  tabItem(tabName = "baz",
                  h2("To be done"),
                  infoBox("New Orders", 10 * 2, icon = icon("credit-card"))
  )

)
)
)

server .r

library(shiny)

shinyServer(function(input, output) {

output$distPlot <- renderPlot({

# generate bins based on input$bins from ui.R
x    <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)

# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white')

})

})

from shinydashboard.

geoHeil avatar geoHeil commented on August 22, 2024

Thanks a lot!!!

from shinydashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.