Я пытался построить plotlyOutput на моей панели shinydashboardplus, внутри boxPlus, поле отображается, но график не отображается.
body = dashboardBody(
tabItems(
############################################# tabitem started #########################################################
tabItem(tabName = "Tutorial",
boxPlus(
title = "Closable Box with dropdown",
closable = TRUE,
width = NULL,
status = "warning",
solidHeader = FALSE,
collapsible = TRUE,
enable_dropdown = TRUE,
p("Box Content"),
plotlyOutput("plot1")
),
helpText("this is home page")
)
................
server = function(input, output) {
output$plot1 = renderPlotly({
ggplotly(ggplot(Visual_data) +
aes(x = Date, y = return_) +
geom_line(size = 0.28, colour = "#01579B") +
geom_hline(yintercept = 0) +
labs(x = "Date", y = "3 Years return (in %)", title = "Previous Returns Over Years", subtitle = "Predictions by the model", caption = "Considering 88.1% Confidence") +
scale_fill_gradient(low = "red",
high = "green",
limits = c(-10, 70)) +
theme_few())
})
}