.load_bundle() helper function once per page instead of repeating cache initialization boilerplate for every dataset.add_pagination().add_metric() / html_metric() now renders as a modern KPI card with centered text, gradient background, and bold value display — matching the preview() style. Previously, generate_dashboard() and preview() produced different metric visuals.
gradient: Controls gradient background. TRUE (default) uses the default purple gradient. Pass a color name or hex (e.g., gradient = "red", gradient = "#cb333b") to auto-generate a gradient from that color. FALSE for a plain flat card.gradient_intensity: Controls how dramatic the gradient shift is (0–1, default 0.45). 0 = flat, 1 = maximum contrast. For dark colors, controls how much lighter the gradient start is; for light colors, controls how much darker the end is.color: Now serves as the base color for gradient generation when gradient is active (instead of a left-border accent). With gradient = FALSE, it becomes a solid background color.add_layout_row() metrics in preview: Layout containers (add_layout_column() / add_layout_row()) now render correctly in preview(). Previously, items inside layout rows were silently dropped. Row items now display side-by-side via CSS flex.deferred_charts = TRUE in create_dashboard(): Only renders initially visible charts; others become lightweight JSON placeholders that load on demand when revealed by show_when. Dramatically reduces initial page load time for dashboards with many hidden chart states.cross_tab_data_mode = "asset" in create_dashboard(): Writes cross-tab data to external .json files instead of inlining in HTML. Reduces HTML file size for dashboards with many filtered charts.min_cell_size parameter for privacy protection — suppresses cross-tab rows where cell count is below the threshold.rds_bundle_threshold parameter bundles generated datasets into a single .rds file for large dashboards.icons parameter on add_input(), render_input(), and internal radio/button group generators. Supports Iconify icon names (e.g., "ph:calendar") rendered before option text.show_when parameter on add_input() wraps the input in a conditional visibility container, enabling inputs that appear/disappear based on other filter selections.add_linked_inputs() now works in content collections and input rows, not just sidebars.slug parameter on add_dashboard_page() / add_page() for custom page filenames, overriding the default name-based slug.data_labels_enabled parameter on viz_timeline() to display data point values directly on the chart.viz_boxplot, viz_scatter, viz_pie, viz_stackedbar, and viz_timeline with improved cross-tab support and backend-specific rendering.change event dispatch in input_filter.js)._quarto.yml).@param entries for new parameters).devtools::load_all() with library(dashboardr) in 10 vignettes; added purl = FALSE to 7 documentation-only vignettes..Rbuildignore to exclude demo output directories, .quarto dirs, vignettes/lib/, and .DS_Store files.globalVariables() entries for NSE columns in viz_boxplot and viz_scatter.generate_dashboard(standalone = TRUE): Generate a single self-contained HTML file with all CSS, JavaScript, images, and fonts embedded inline. The resulting file can be shared via email or file transfer without a web server.type = "date" and type = "daterange" for time-based filtering.enable_url_params().enable_accessibility().html_metric() / add_metric() gain bg_color, text_color, value_prefix, value_suffix, and border_radius parameters for richer styling, similar to add_value_box().add_layout_row() gains a style parameter for inline CSS on the row wrapper (e.g. style = "text-align: center;"). Applied to layout-ncol divs in non-dashboard mode and ### Row attributes in dashboard mode.html_spacer(), html_divider(), html_card(), html_accordion(), html_iframe(), html_badge(), html_metric().add_layout_row() / end_layout_row() now render side-by-side as expected, consistent with add_value_box_row() behavior.text_color on metric cards now properly applies to title and subtitle text (Bootstrap text-muted class was overriding the inherited color).R/viz_registry.R) replaces hardcoded switch dispatch in R/viz_generation.R.New exported convenience functions for embedding charts from alternative backends:
add_echarts(): Embed an echarts4r chart directly into a dashboard page.add_ggiraph(): Embed a ggiraph interactive plot directly into a dashboard page.add_ggplot(): Embed a static ggplot2 plot, rendered via Quarto's knitr graphics device with optional height/width control.dashboardr_mcp_server(): Launch an MCP (Model Context Protocol) server that exposes dashboardr documentation, function reference, example code, and visualization guides to LLM-powered coding assistants (Claude Desktop, Claude Code, Cursor, VS Code Copilot). Requires optional packages ellmer + mcptools (or mcpr as fallback).tabgroup argument is now correctly applied to all content block types (add_text, add_card, add_reactable, and other content types), not just visualizations. Previously, tabgroup had no effect for non-viz content. Standalone content blocks, items inside content collections, and items added directly to pages via add_text() / add_card() / etc. now all respect tabgroup and render in their respective tabs.skip_on_covr_ci() to feature-matrix and generation-heavy tests that were running under covr instrumentation without memory guards. Added memory diagnostics and timeout-minutes to workflows for better failure reporting.tabgroup argument is now correctly applied to all content block types (add_text, add_card, add_reactable, and other content types), not just visualizations. Previously, tabgroup had no effect for non-viz content. Standalone content blocks, items inside content collections, and items added directly to pages via add_text() / add_card() / etc. now all respect tabgroup and render in their respective tabs.61.53846153846154) when charts were rebuilt client-side via cross-tab filtering. The R-side rounding was correct, but the JavaScript _rebuildStackedBarEcharts, _rebuildStackedBarPlotly, and _rebuildStackedBarSeries (Highcharts) functions recomputed percentages from raw counts without rounding. All three JS rebuild paths now round to the configured label_decimals (default: 1 for percent, 0 for count).labelDecimals is now passed from R to the JS cross-tab config so client-side rebuilds respect the same decimal precision as the initial R render.preview(quarto = TRUE) and .install_iconify_extension() now use .find_quarto_path() which searches PATH, the quarto R package, and the RStudio-bundled Quarto location. Previously, only Sys.which("quarto") was used, causing failures in environments where Quarto was installed but not on PATH.legend_position parameter across all 10 visualization functions..color to globalVariables() to suppress R CMD check note.sparkline_card functions as @keywords internal to fix pkgdown reference index.testthat tests and resolved Quarto detection skips.All 17 visualization functions now support a backend parameter for rendering with different charting libraries. The default backend remains "highcharter" for full backward compatibility.
Supported backends: "highcharter" (default), "plotly", "echarts4r", "ggiraph".
# Per-chart backend selection
viz_bar(data, x_var = "category", backend = "plotly")
viz_timeline(data, time_var = "year", y_var = "value", backend = "echarts4r")
# Dashboard-wide backend (applies to all charts)
create_dashboard(title = "My Dashboard", backend = "plotly")
Alternative backends are optional dependencies (in Suggests). Install only what you need:
install.packages(c("plotly", "echarts4r", "ggiraph"))
New functions for embedding arbitrary htmlwidgets in dashboards:
add_widget(): Embed any htmlwidget object directlyadd_plotly(): Convenience wrapper for plotly objectsadd_leaflet(): Convenience wrapper for leaflet mapslibrary(plotly)
my_plot <- plot_ly(mtcars, x = ~wt, y = ~mpg, type = "scatter", mode = "markers")
collection <- content_collection() + add_plotly(my_plot, title = "Weight vs MPG")
gallery/index.html.filterVars JSON serialization — single-element character vectors (e.g., c("country")) were serialized as a string instead of an array, causing the JavaScript to iterate over individual characters instead of matching filter values.rebuildFromCrossTab(), so labeled sliders had no effect on cross-tab charts. Sliders now correctly filter data by label position.override = TRUE) were invisible because cross-tab data filtering excluded them. Override series data is now preserved during filtering, and switch visibility is applied after cross-tab rebuild.New sidebar-based dashboard pattern with client-side cross-tab filtering. Sidebar radio/checkbox inputs dynamically filter and rebuild Highcharts visualizations (stacked bars and timelines) without server round-trips.
show_when: Conditionally show/hide visualizations based on sidebar input values. Uses formula syntax (e.g., show_when = ~ time_period == "Over Time"). Hidden elements fully collapse in layout, including empty bslib-grid containers.
title_map: Dynamic chart titles that interpolate sidebar input values. Uses {placeholder} syntax in titles with a simple named-vector mapping. Auto-detects which input to read from — no manual wiring needed.
title_map = list(key_response = c("Marijuana" = "Legal", "Gun Control" = "Favor"))
group_order (timeline): Control the order of series in timeline charts. Pass a character vector to enforce consistent series/legend ordering across chart types.
Named color_palette: Pass a named character vector to color_palette to assign fixed colors per series name, ensuring consistent colors across stacked bars and timelines.
color_palette = c("Male" = "#F28E2B", "Female" = "#E15759", "White" = "#EDC948")
Unnamed vectors still work as positional color cycles (backwards compatible).
viz_stackedbar() now supports title_map for dynamic title interpolation, matching timeline functionality.color_palette resolves colors by stack-level name, not just position.viz_timeline() now supports group_order for explicit series ordering.color_palette assigns colors per group name, preserved during client-side filter rebuilds.title_map with auto-detection of the relevant sidebar input.colorMap) and group order (groupOrder) are embedded in chart config and respected during JS rebuilds.titleTemplate and titleLookups in the chart config.haven_labelled columns in cross-tab data..serialize_arg() to correctly preserve names in named character vectors.bslib-grid containers still occupying space when their children are hidden by show_when (now uses !important CSS class).{placeholder} not interpolating due to chart ID matching mismatch in JS.dev/demo_sidebar_dashboard.R) showcasing all new features: sidebar inputs, conditional visibility, dynamic titles, cross-tab filtering, named color palettes, and consistent series ordering.add_pagination() duplicating content across all pages: When using the + operator to add visualizations to a page, the viz_embedded_in_content flag caused .generate_default_page_content() to use the original full content_blocks instead of the correctly-split paginated visualizations. Each paginated page now correctly contains only its designated content section.shared_first_level behavior for nested tabgroups: The shared_first_level feature (which wraps multiple top-level tabgroups into a single shared tabset) is now automatically disabled when any of the top-level tabgroups contain nested children. This prevents redundant wrapper tabsets when using deeply nested tabgroup structures like category/wave/breakdown.viz_stackedbar() is now a unified function that supports two modes:
Mode 1: Grouped/Crosstab (use x_var + stack_var)
# Show how one variable breaks down by another
viz_stackedbar(data, x_var = "education", stack_var = "gender")
Mode 2: Multi-Variable/Battery (use x_vars)
# Compare multiple survey questions side-by-side
viz_stackedbar(data, x_vars = c("q1", "q2", "q3"))
This eliminates confusion between viz_stackedbar() and viz_stackedbars() - you now only need to remember one function! The function automatically detects which mode to use based on the parameters you provide.
Migration from viz_stackedbars(): Simply change the function name - all parameters work the same way:
# Old way (still works, shows deprecation notice)
viz_stackedbars(data, x_vars = c("q1", "q2", "q3"))
# New preferred way
viz_stackedbar(data, x_vars = c("q1", "q2", "q3"))
The viz_stackedbars() function is soft-deprecated and will continue to work, but we recommend using viz_stackedbar() for all new code.
All create_* visualization functions have been renamed to viz_* for clarity and to
distinguish them from dashboard-level creation functions:
| Old Name | New Name |
|----------|----------|
| create_histogram() | viz_histogram() |
| create_bar() | viz_bar() |
| create_stackedbar() | viz_stackedbar() |
| create_stackedbars() | viz_stackedbars() |
| create_timeline() | viz_timeline() |
| create_heatmap() | viz_heatmap() |
| create_scatter() | viz_scatter() |
| create_map() | viz_map() |
| create_treemap() | viz_treemap() |
The old function names are deprecated and will show a warning when used. They will be removed in a future version.
Migration: Simply replace create_ with viz_ in your code.
Timeline chart parameters have been renamed for consistency with other visualization types:
| Old Name | New Name |
|----------|----------|
| response_var | y_var |
| response_filter | y_filter |
| response_filter_combine | y_filter_combine |
| response_filter_label | y_filter_label |
| response_levels | y_levels |
| response_breaks | y_breaks |
| response_bin_labels | y_bin_labels |
viz_bar() now supports error bars for displaying uncertainty in mean values:
value_var parameter: When provided, bars show the mean of this variable per category (instead of counts)error_bars parameter: Choose from "none" (default), "sd" (standard deviation), "se" (standard error), or "ci" (confidence interval)ci_level parameter: Set confidence level for CI (default 0.95 for 95% CI)error_bar_color and error_bar_width parametersExample usage:
# Bar chart with means and 95% CI
viz_bar(
data = mtcars,
x_var = "cyl",
value_var = "mpg",
error_bars = "ci",
title = "Mean MPG by Cylinders"
)
# Grouped bars with standard error
viz_bar(
data = mtcars,
x_var = "cyl",
group_var = "am",
value_var = "mpg",
error_bars = "se"
)
preview() now automatically validates all visualization specs before rendering, catching missing required parameters (like stack_var for stacked bar charts) and invalid column names early with helpful error messagesvalidate_specs() function for manual validation of content collectionsprint(collection, check = TRUE) validates specs while viewing the structureviz_density(): Create kernel density estimate plots for visualizing continuous distributions. Supports grouped densities, adjustable bandwidth, rug marks, and weighted estimation.viz_boxplot(): Create interactive box-and-whisker plots. Supports grouped boxplots, horizontal orientation, outlier display, and weighted percentiles.data_labels_enabled parameter to control display of value labels on barsdata_labels_enabled parameter to viz_histogram(), viz_bar(), viz_stackedbar(), and viz_stackedbars() - allows hiding value labels on bars for cleaner visualizationsshow_labels to data_labels_enabled in viz_treemap() for consistency (old parameter still works with deprecation warning)viz_heatmap() already had data_labels_enabled - now all viz functions use the same parameter namedensity_vignette, boxplot_vignette, histogram_vignette, scatter_vignette, treemap_vignette, map_vignettevignette("advanced-features")preview()stackedbars visualization type