图标不出现在ShinyDashboardPlus :: BoxDropdown()中
我试图将以下图标实现到闪亮的应用程序中。
但图标正在出现。我正在尝试以下闪亮的代码。
library(shiny)
library(shinydashboard)
shinyApp(fluidPage(
# Give the page a title
titlePanel("Telephones by region"),
# Generate a row with a sidebar
sidebarLayout(
# Define the sidebar with one input
sidebarPanel(
selectInput("region", "Region:",
choices=colnames(WorldPhones)),
hr(),
helpText("Data from AT&T (1961) The World's Telephones.")
),
# Create a spot for the barplot
mainPanel(
shinydashboardPlus::box(
# Analysis UI Module function and arguments from JSON file
plotOutput("phonePlot"),
title = "Hi!",
width = 12,
closable = TRUE,
collapsible = TRUE,
dropdownMenu = shinydashboardPlus::boxDropdown(
shinydashboardPlus::boxDropdownItem("Hi!"),
shinydashboardPlus::boxDropdownItem("Hello!"),
icon = icon("circle-ellipsis")
)
)
)
)
),
# Define a server for the Shiny app
function(input, output) {
# Fill in the spot we created for a plot
output$phonePlot <- renderPlot({
# Render a barplot
barplot(WorldPhones[,input$region]*1000,
main=input$region,
ylab="Number of Telephones",
xlab="Year")
})
})
我正在尝试使用“ Circle-ellipsis”图标,它也不适用于唯一的“省略号”图标。任何建议都得到高度赞赏。
I was trying to implement the below icon into the shiny app.
But the icon is appearing. I was trying with the below shiny code.
library(shiny)
library(shinydashboard)
shinyApp(fluidPage(
# Give the page a title
titlePanel("Telephones by region"),
# Generate a row with a sidebar
sidebarLayout(
# Define the sidebar with one input
sidebarPanel(
selectInput("region", "Region:",
choices=colnames(WorldPhones)),
hr(),
helpText("Data from AT&T (1961) The World's Telephones.")
),
# Create a spot for the barplot
mainPanel(
shinydashboardPlus::box(
# Analysis UI Module function and arguments from JSON file
plotOutput("phonePlot"),
title = "Hi!",
width = 12,
closable = TRUE,
collapsible = TRUE,
dropdownMenu = shinydashboardPlus::boxDropdown(
shinydashboardPlus::boxDropdownItem("Hi!"),
shinydashboardPlus::boxDropdownItem("Hello!"),
icon = icon("circle-ellipsis")
)
)
)
)
),
# Define a server for the Shiny app
function(input, output) {
# Fill in the spot we created for a plot
output$phonePlot <- renderPlot({
# Render a barplot
barplot(WorldPhones[,input$region]*1000,
main=input$region,
ylab="Number of Telephones",
xlab="Year")
})
})
I am trying with 'circle-ellipsis' icon, it is also not working with the only 'ellipsis' icon. Any suggestion is highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以改用
图标(“ Ellipsis-H”)
。Shiny :: Icon
支持Fontawesome版本4和5的图标。您可以在此处搜索这些图标:You can use
icon("ellipsis-h")
instead.shiny::icon
supports icons from FontAwesome versions 4 and 5. You can search for these icons here: