| Type: | Package |
| Title: | Sunburst 'HTML' Widget Based on 'd3.js' |
| Version: | 0.5.0 |
| Description: | Provides a sunburst plot based on the 'd3.js' library as an HTML 'shiny' widget. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Depends: | shiny |
| Imports: | htmlwidgets, tidyr, bslib, glue, DT, tibble, dplyr, purrr, scales, waiter |
| Suggests: | jsonlite, testthat (≥ 3.0.0), covr, mockery, knitr, rmarkdown |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | no |
| Packaged: | 2026-02-18 20:54:20 UTC; foltynsk |
| Author: | Kamil Foltyński [aut, cre] |
| Maintainer: | Kamil Foltyński <kamil@foltynski.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-02-23 09:30:02 UTC |
Add Remain and Diff Columns to a Data Frame
Description
Add Remain and Diff Columns to a Data Frame
Usage
add_remain_and_diff_cols(btns_df, totalPathways)
Arguments
btns_df |
A data frame with a |
totalPathways |
A numeric value for the total number of pathways. |
Value
A data frame with formatted Remain and Diff columns.
callJS
Description
See: https://deanattali.com/blog/htmlwidgets-tips/
Usage
callJS()
Value
id
Create a Colored Action Button
Description
Create a Colored Action Button
Usage
customActionButton(inputId, label, color, font_size = "10px")
Arguments
inputId |
The input slot for the button. |
label |
The button label. |
color |
A CSS color string for the button background. |
font_size |
A CSS font size string. |
Value
A shiny::actionButton with custom styling.
Get Pathway Group Data Table
Description
Sends a custom message to the sunburst widget to retrieve pathway group data.
Usage
getPathwayGroupDatatable(id, pathwayAnalysisDTO, pathLength)
Arguments
id |
The namespaced widget output ID. |
pathwayAnalysisDTO |
A list containing the pathway analysis data. |
pathLength |
An integer specifying the pathway length. |
Value
The widget element ID (invisibly).
Match Event Names to Colors
Description
Match Event Names to Colors
Usage
match_color(x, eventCodes)
Arguments
x |
A character string of comma-separated event names. |
eventCodes |
A data frame with |
Value
A character string of HTML action buttons.
Run the Sunburst Demo App
Description
Launches an example Shiny application that demonstrates the sunburst widget.
Usage
run_app(...)
Arguments
... |
Additional arguments passed to |
Value
This function does not return; it runs the Shiny app.
Create a Sunburst Shiny Widget
Description
Creates an interactive sunburst plot as an HTML widget.
Usage
sunburstShinyWidget(
data,
design,
width = NULL,
height = NULL,
elementId = NULL
)
Arguments
data |
A list containing the chart data. |
design |
A list containing the design configuration. |
width |
Widget width (a valid CSS unit or a number). |
height |
Widget height (a valid CSS unit or a number). |
elementId |
An optional element ID for the widget. |
Value
An htmlwidget object.
Shiny bindings for sunburstShinyWidget
Description
Output and render functions for using sunburstShinyWidget within Shiny applications and interactive Rmd documents.
Usage
sunburstShinyWidgetOutput(outputId, width = "100%", height = "400px")
renderSunburstShinyWidget(expr, env = parent.frame(), quoted = FALSE)
Arguments
outputId |
output variable to read from |
width, height |
Must be a valid CSS unit (like |
expr |
An expression that generates a sunburstShinyWidget |
env |
The environment in which to evaluate |
quoted |
Is |
Value
sunburstShinyWidgetOutput returns a shiny.tag.list object
containing the HTML output container for the sunburst widget.
renderSunburstShinyWidget returns a shiny.render.function that
evaluates the given expression to produce a sunburst widget for the
corresponding output element.
Sunburst Shiny Module UI
Description
Sunburst Shiny Module UI
Sunburst Shiny Module Server
Usage
sunburstUI(id)
sunburstServer(
id,
chartData,
design,
btn_font_size = "14px",
show_colors_in_table = FALSE,
steps_table_export_name = reactive(NULL),
n_steps = reactive(5L)
)
Arguments
id |
A character string for the module namespace. |
chartData |
A list containing chart data including event codes and cohort pathways. |
design |
A list containing design configuration for the sunburst plot. |
btn_font_size |
A character string for action button font size. |
show_colors_in_table |
Logical; if |
steps_table_export_name |
A reactive returning a custom export filename,
or |
n_steps |
A reactive returning the number of pathway steps to display. |
Value
A tagList containing the sunburst UI elements.
A Shiny module server function.