DataTables

Patchwork.DataTablesPlugin.DataTablesType
DataTables(title::String, data::Vector{Vector{Any}}, columns::Vector{String})

Interactive table with sorting, searching, and pagination using DataTables.

Fields

  • title::String: Table title
  • data::Vector{Vector{Any}}: Table data as rows
  • columns::Vector{String}: Column headers

Examples

using Patchwork

table = Patchwork.DataTables(
    "Sales Data",
    [
        ["Q1", 100, 150],
        ["Q2", 120, 160],
        ["Q3", 140, 180],
        ["Q4", 130, 170],
    ],
    ["Period", "Product A", "Product B"],
)

dashboard = Patchwork.Dashboard("Dashboard", [Patchwork.Tab("Data", [table])])
save(dashboard, "output.html")
source