如何解决问题:侧栏菜单中的menuItem充当下拉菜单,并且未引用相应的正文
我是R的初学者,想问一下您是否可以帮助我解决以下问题:
我在sidebarMenu中创建了多个menueItems。在向每个输入添加了多个输入(如selectInput,dateRangeInput ...)之后,它们充当了一个下拉菜单,并且没有引用各自的身体了。为了解决这个问题,我创建了一个额外的menuSubitem(它可以工作,但是我认为该解决方案不是很好)。
没有此额外的menuSubitem,正文内容将不会显示。如果我单击原始menuItem的图标,则仅打开下拉菜单(显示主体的选择器和额外添加的menuSubitem),但未打开相应的主体本身。我还希望下拉列表激活引荐主体(这样我就不再需要menuSubitem了)。希望我的问题很清楚。
如果能帮助我,那将是很棒的:)
# code chunk:
...
sidebarMenu(
menuItem("Graph1",tabName = "About1",icon = icon("th"),without this extra menuSubitem,the content of the body does not show up. if i click on the icon above(Graph1) it just opens the drop down,but not opening the body.
menuSubItem("Graph2",icon = icon("th")),# Input: Select a date range ---
dateRangeInput(
"dat","Date Range of Vehicle Registration: ",start = "2009-01-01",end = "2016-12-28",min = "2009-01-01",max = "2016-12-28",format = "dd/mm/yyyy",separator = "to",startview = "year"
),# Input: community ---
selectInput("com","Community: ",c("ALL",unique(as.character(sort(table_data$Community_Registration)))),selectize = FALSE
),# Input: federal state ---
selectInput("fed","Federal State: ",unique(as.character(sort(table_data$Federal_State_Registration)))),selectize = FALSE
)
),menuItem("Heatmap1",tabName = "About2",menuSubItem("Heatmap2",#extra button i want to avoid
# Panel for user inputs ---
# Input: Community ---
selectInput("com_heat",unique(as.character(sort(data$Community_Registration)))),selectize = FALSE
),# Input: federal state ---
selectInput("fed_heat",unique(as.character(sort(data$Federal_State_Registration)))),# Input: Select heatmap intensity ---
sliderInput("max_heat","Heatmap Intensity: ",min = 1,max = 100,value = 100
)
),...
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。