I am trying to decrease the size of my dygraph output. But all of my settings seem to be ignored.
I have tried specifying the height in both the dashboard layout and dygraph settings. All packages and software is up-to-date via github not CRAN.
Here is what I have tried below.
I have listed my code below in DOM hierarchical order to assist with your understanding.
shinyUI(dashboardPage(header, sidebar, body))
body <- dashboardBody(
tabItems(
...
tabItem(tabName = "comments_explorer_tab", tab_comment),
...
)
)
tab_comment <- fluidPage(
titlePanel("Data Explorer")
column(
...
width = 2 # reduce width of sidebar
),
column(
width = 10,
fluidRow(height='50px',
tabsetPanel(
tabPanel("Time", height=50, dygraphs::dygraphOutput("comment_dygraph")))
),
fluidRow(DTOutput("data_table"))
)
)
shinyServer(function(input, output) {
output$comment_dygraph <- renderDygraph({
dygraph(comment_counts, height=50, main = paste0("Daily Counts for "user")) %>%
dyOptions(colors = RColorBrewer::brewer.pal(3, "Dark2"), includeZero = TRUE, retainDateWindow = TRUE) %>%
dyAxis("x", drawGrid = FALSE) %>%
dyAxis("y", label = "Counts")
})
output$data_table <- renderDT({
datatable(data = comment_time_selection(),
extensions = c("Scroller"),
options = list(
autoWidth = TRUE,
scrollResize =TRUE,
scrollX = TRUE,
scrollCollapse= TRUE,
scrollY = 100,
initComplete = I('function(setting, json) { alert("done"); }')
),
rownames= FALSE
)
})
}
question from:
https://stackoverflow.com/questions/65920006/unable-to-change-size-of-dygraphs-in-shiny 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…