【问题标题】:Logo instead of application title Shiny徽标而不是应用程序标题 Shiny
【发布时间】:2016-01-18 02:57:01
【问题描述】:

如何在 Shiny 应用中放置标题而不是标题:

navbarPage("title",theme = shinytheme("flatly"), 
                   tabPanel("Home",

菜单选项卡大小中的一些徽标? 我试过这个解决方案: How can I insert an image into the navbar on a shiny navbarPage() 但不知何故不起作用。图片太大覆盖所有菜单项

谢谢

【问题讨论】:

    标签: r user-interface shiny navbar tabpanel


    【解决方案1】:

    这是一个老问题,但我一直在寻找解决方案,而当我尝试使用 shinyapps.io 发布我的应用程序时发现的其他问题导致了问题,这是因为我同时使用了 fluidPagenavbarPage 其他答案中的建议。

    这是我从 shinyapps.io 的支持团队收到的解决方案

    #~~~~~~~~~~~~~~~~~~~~~~~ LOGAN SERVICES DASHBOARD ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    ui <- shiny::navbarPage(#the line of code places the logo on the left hand side before the tabs start. See image below.
                            title = div(img(src='LoganTogether-LOGO.jpg',
                            style="margin-top: -14px;
                                   padding-right:10px;
                                   padding-bottom:10px",
                            height = 60)),
                            #theme = "journal",
                            windowTitle="Logan Together: Service Map",
    
                            #MAIN TAB~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                       
                            tabPanel("Interactive map", # then you go on to code the rest of your UI as normal
    

    【讨论】:

      猜你喜欢
      • 2013-05-08
      • 1970-01-01
      • 1970-01-01
      • 2017-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-02
      • 1970-01-01
      相关资源
      最近更新 更多