Skip to content

Commit

Permalink
feat(data-viz): add data table
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendiot42 committed Sep 24, 2024
1 parent 25ae632 commit 0674255
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/fun/func_data-viz.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ data_viz_ui <- function(id) {
),
div(
plotlyOutput(ns("plot"))
),
div(style = "margin-top: 30px;",
dataTableOutput(ns("dataTable"))
)
)
}
Expand Down Expand Up @@ -86,6 +89,18 @@ data_viz_server <- function(id, plot_data) {
)
)
})

output$dataTable <- renderDataTable({
DT::datatable(plot_data(),
filter = "top",
style = "bootstrap4",
options = list(
pageLength = 20,
lengthMenu = c(10, 20, 50, 100),
sDom = '<"top"f>rt<"bottom"lp><"clear">'
)
)
})
})
}

Expand Down

0 comments on commit 0674255

Please sign in to comment.