gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 16:09:36 26 4
gpt4 key购买 nike

如何在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com