r - 标志而不是应用程序标题 Shiny

标签 r user-interface shiny navbar tabpanel

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

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

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

谢谢

最佳答案

这是一个老问题,但我一直在寻找解决方案,当我尝试使用 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
enter image description here

关于r - 标志而不是应用程序标题 Shiny ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33219885/

相关文章:

r - plyr 转换后不返回新变量

language-agnostic - 在标签云中缩放标签

r - 如何在 Shiny Dashboard 的框中将表格居中

r - DT::datatable 的条纹

r - 财务数据 - R 数据表 - 按条件分组

r - 将矢量图像置于网格中以在 R 中进行克里金法

R动态地将具有NA的多个列合并为单个列

user-interface - Unity3d。如何获取ui元素的屏幕或世界位置

iOS控件通过键入来选择值

css - 更改 Shiny 仪表板中的菜单图标