Changelog
dashboardr 0.5.0
New Features
Standalone HTML Export
-
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.
New Vignettes
- Customizing Visualizations: Comprehensive guide to color palettes, tooltips, legends, data labels, axis formatting, error bars, sorting, and backend options โ with GSS data examples.
-
Date Inputs: Using
type = "date"andtype = "daterange"for time-based filtering. -
URL Parameters: Shareable dashboard links with pre-set filter state via
enable_url_params(). -
Accessibility: WCAG 2.1 AA features including skip-to-content, focus indicators, modal focus trapping, keyboard tab navigation, ARIA live regions, and reduced motion support via
enable_accessibility().
HTML Helper Functions
- New exported helpers:
html_spacer(),html_divider(),html_card(),html_accordion(),html_iframe(),html_badge(),html_metric().
dashboardr 0.4.2
New Features
Widget Convenience Wrappers
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 optionalheight/widthcontrol.
MCP Server for LLM Assistants
-
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 packagesellmer+mcptools(ormcpras fallback).
Bug Fixes
Content Tabgroups (Issue #14)
-
Fixed: The
tabgroupargument is now correctly applied to all content block types (add_text,add_card,add_reactable, and other content types), not just visualizations. Previously,tabgrouphad no effect for non-viz content. Standalone content blocks, items inside content collections, and items added directly to pages viaadd_text()/add_card()/ etc. now all respecttabgroupand render in their respective tabs.
CI Stability
-
Fixed: GitHub Actions coverage and R CMD check workflows were failing with exit code 143 (OOM kill). Added
skip_on_covr_ci()to feature-matrix and generation-heavy tests that were running under covr instrumentation without memory guards. Added memory diagnostics andtimeout-minutesto workflows for better failure reporting.
dashboardr 0.4.1
Bug Fixes
Content Tabgroups (Issue #14)
-
Fixed: The
tabgroupargument is now correctly applied to all content block types (add_text,add_card,add_reactable, and other content types), not just visualizations. Previously,tabgrouphad no effect for non-viz content. Standalone content blocks, items inside content collections, and items added directly to pages viaadd_text()/add_card()/ etc. now all respecttabgroupand render in their respective tabs.
dashboardr 0.4.0
Bug Fixes
Cross-Tab Stacked Bar Labels (Critical)
-
Fixed: Stacked bar data labels showed full floating-point precision (e.g.ย
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 configuredlabel_decimals(default: 1 for percent, 0 for count). -
New:
labelDecimalsis now passed from R to the JS cross-tab config so client-side rebuilds respect the same decimal precision as the initial R render. - New: Labels on very small bar segments (< 5% of their stack) are now automatically hidden across all backends (echarts4r, Highcharts, Plotly, ggiraph) to avoid visual clutter.
Quarto Discovery
-
Fixed:
preview(quarto = TRUE)and.install_iconify_extension()now use.find_quarto_path()which searches PATH, thequartoR package, and the RStudio-bundled Quarto location. Previously, onlySys.which("quarto")was used, causing failures in environments where Quarto was installed but not on PATH.
Documentation & Tests
- Documented
legend_positionparameter across all 10 visualization functions. - Added
.colortoglobalVariables()to suppress R CMD check note. - Marked
sparkline_cardfunctions as@keywords internalto fix pkgdown reference index. - Fixed all empty
testthattests and resolved Quarto detection skips.
New Features
Multi-Backend Chart Support
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"))Widget Embedding
New functions for embedding arbitrary htmlwidgets in dashboards:
-
add_widget(): Embed any htmlwidget object directly -
add_plotly(): Convenience wrapper for plotly objects -
add_leaflet(): Convenience wrapper for leaflet maps
library(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")dashboardr 0.3.0
New Features
Community Gallery
- Added a Community Gallery showcasing dashboardr dashboards, hosted as a Vue.js SPA at
gallery/index.html. - Users can submit their own dashboards via a GitHub issue template.
- Gallery is prominently featured in the pkgdown site navbar, README, getting-started vignette, and demos vignette.
Bug Fixes
Input Filtering
-
Select inputs: Fixed
filterVarsJSON 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. -
Slider inputs: Slider filters were collected but never passed to
rebuildFromCrossTab(), so labeled sliders had no effect on cross-tab charts. Sliders now correctly filter data by label position. -
Switch inputs: Switch-toggled series (e.g., โGlobal Averageโ with
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.
dashboardr 0.2.1
New Features
Sidebar Dashboards with Cross-Tab Filtering
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 emptybslib-gridcontainers.-
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. 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 tocolor_paletteto 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).
Stacked Bar Enhancements
-
viz_stackedbar()now supportstitle_mapfor dynamic title interpolation, matching timeline functionality. - Named
color_paletteresolves colors by stack-level name, not just position.
Timeline Enhancements
-
viz_timeline()now supportsgroup_orderfor explicit series ordering. - Named
color_paletteassigns colors per group name, preserved during client-side filter rebuilds. -
title_mapwith auto-detection of the relevant sidebar input.
Client-Side Filtering (JS)
- Stacked bar and timeline charts embed cross-tab data and config as HTML attributes, enabling instant client-side rebuilds when sidebar inputs change.
- Color maps (
colorMap) and group order (groupOrder) are embedded in chart config and respected during JS rebuilds. - Dynamic title interpolation via
titleTemplateandtitleLookupsin the chart config.
Bug Fixes
- Fixed C stack overflow when serializing
haven_labelledcolumns in cross-tab data. - Fixed
.serialize_arg()to correctly preserve names in named character vectors. - Fixed empty
bslib-gridcontainers still occupying space when their children are hidden byshow_when(now uses!importantCSS class). - Fixed dynamic title
{placeholder}not interpolating due to chart ID matching mismatch in JS.
dashboardr 0.2.0
Bug Fixes
Pagination Fix
-
Fixed
add_pagination()duplicating content across all pages: When using the+operator to add visualizations to a page, theviz_embedded_in_contentflag caused.generate_default_page_content()to use the original fullcontent_blocksinstead of the correctly-split paginatedvisualizations. Each paginated page now correctly contains only its designated content section.
Tabgroup Improvements
-
Fixed
shared_first_levelbehavior for nested tabgroups: Theshared_first_levelfeature (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 likecategory/wave/breakdown.
dashboardr 0.1.0
Unified Stacked Bar Chart Function
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.
Breaking Changes
Visualization Function Renaming
All create_* visualization functions have been renamed to viz_* for clarity and to distinguish them from dashboard-level creation functions:
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 Parameter Renaming
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 |
New Features
Error Bars Support in Bar Charts
viz_bar() now supports error bars for displaying uncertainty in mean values:
- New
value_varparameter: When provided, bars show the mean of this variable per category (instead of counts) - New
error_barsparameter: Choose from โnoneโ (default), โsdโ (standard deviation), โseโ (standard error), or โciโ (confidence interval) - New
ci_levelparameter: Set confidence level for CI (default 0.95 for 95% CI) - Customizable appearance via
error_bar_coloranderror_bar_widthparameters - Works with both simple and grouped bar charts
Example usage:
Early Validation for Visualizations
-
preview()now automatically validates all visualization specs before rendering, catching missing required parameters (likestack_varfor stacked bar charts) and invalid column names early with helpful error messages - New
validate_specs()function for manual validation of content collections -
print(collection, check = TRUE)validates specs while viewing the structure
New Visualization Types
-
viz_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.
Histogram Improvements
- Fixed handling of character-numeric values (e.g., โ25โ, โ30โ) - now correctly converted to numeric for binning
- Improved default bin labels to show readable ranges (e.g., โ18-29โ instead of โ[18,30)โ)
- Added
data_labels_enabledparameter to control display of value labels on bars
Data Labels Control
- Added
data_labels_enabledparameter toviz_histogram(),viz_bar(),viz_stackedbar(), andviz_stackedbars()- allows hiding value labels on bars for cleaner visualizations - Renamed
show_labelstodata_labels_enabledinviz_treemap()for consistency (old parameter still works with deprecation warning) -
viz_heatmap()already haddata_labels_enabled- now all viz functions use the same parameter name
Documentation
- Added new visualization vignettes:
density_vignette,boxplot_vignette,histogram_vignette,scatter_vignette,treemap_vignette,map_vignette - Interactive inputs demo and documentation in
vignette("advanced-features") - Improved cross-references between vignettes
Bug Fixes
- Fixed Unicode/emoji rendering issues in console output
- Fixed nested tabgroup rendering in
preview() - Fixed parameter mapping for
stackedbarsvisualization type