| Title: | Interactive Visualization Using ECharts |
|---|---|
| Description: | Provides a comprehensive R interface to Apache ECharts (<https://echarts.apache.org>) for creating interactive charts and visualizations. Offers type-checked, validated configuration objects built with S7 classes that mirror the ECharts TypeScript API, with convenience functions for common chart types and full htmlwidgets integration for use in Quarto, Shiny, and IDE viewers. |
| Authors: | E.D. Gennatas [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-9280-3609>) |
| Maintainer: | E.D. Gennatas <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.2.1 |
| Built: | 2026-05-27 18:09:20 UTC |
| Source: | https://github.com/rtemis-org/draw |
Comprehensive R interface to Apache ECharts (https://echarts.apache.org) for creating interactive charts and visualizations. Offers type-checked, validated configuration objects built with S7 classes that mirror the ECharts TypeScript API, with convenience functions for common chart types and full htmlwidgets integration for use in Quarto, Shiny, and IDE viewers.
Maintainer: E.D. Gennatas [email protected] (ORCID) [copyright holder]
Authors:
E.D. Gennatas [email protected] (ORCID) [copyright holder]
Useful links:
Fill styling for areas (polygons, area under curves, etc.).
AreaStyle( color = NULL, opacity = NULL, origin = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )AreaStyle( color = NULL, opacity = NULL, origin = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )
color |
Optional Character: CSS fill color. |
opacity |
Optional Numeric |
origin |
Optional Character {"auto", "start", "end"} or Numeric: Area origin. |
shadow_blur |
Optional Numeric |
shadow_color |
Optional Character: Shadow color. |
shadow_offset_x |
Optional Numeric: Shadow horizontal offset. |
shadow_offset_y |
Optional Numeric: Shadow vertical offset. |
Corresponds to AreaStyleOption in src/util/types.ts (line 1169).
ECharts docs: https://echarts.apache.org/en/option.html#series-line.areaStyle
Configuration for a cartesian axis (xAxis or yAxis). Combines fields from
AxisBaseOptionCommon, NumericAxisBaseOptionCommon, CategoryAxisBaseOption,
ValueAxisBaseOption, LogAxisBaseOption, and TimeAxisBaseOption.
Axis( type = NULL, show = NULL, inverse = NULL, name = NULL, name_location = NULL, name_rotate = NULL, name_gap = NULL, name_text_style = NULL, silent = NULL, trigger_event = NULL, min = NULL, max = NULL, scale = NULL, split_number = NULL, interval = NULL, min_interval = NULL, max_interval = NULL, align_ticks = NULL, log_base = NULL, boundary_gap = NULL, data = NULL, axis_line = NULL, axis_tick = NULL, minor_tick = NULL, axis_label = NULL, split_line = NULL, minor_split_line = NULL, split_area = NULL, position = NULL, grid_index = NULL )Axis( type = NULL, show = NULL, inverse = NULL, name = NULL, name_location = NULL, name_rotate = NULL, name_gap = NULL, name_text_style = NULL, silent = NULL, trigger_event = NULL, min = NULL, max = NULL, scale = NULL, split_number = NULL, interval = NULL, min_interval = NULL, max_interval = NULL, align_ticks = NULL, log_base = NULL, boundary_gap = NULL, data = NULL, axis_line = NULL, axis_tick = NULL, minor_tick = NULL, axis_label = NULL, split_line = NULL, minor_split_line = NULL, split_area = NULL, position = NULL, grid_index = NULL )
type |
Optional Character {"value", "category", "time", "log"}: Axis type. |
show |
Optional Logical: Whether to show the axis. |
inverse |
Optional Logical: Whether to invert the axis. |
name |
Optional Character: Axis name. |
name_location |
Optional Character {"start", "middle", "center", "end"}: Axis name location. |
name_rotate |
Optional Numeric: Axis name rotation angle in degrees. |
name_gap |
Optional Numeric |
name_text_style |
Optional TextStyle: Axis name text style. |
silent |
Optional Logical: Whether the axis is silent. |
trigger_event |
Optional Logical: Whether the axis triggers events. |
min |
Optional Numeric or Character {"dataMin", "dataMax"}: Minimum axis value. |
max |
Optional Numeric or Character {"dataMin", "dataMax"}: Maximum axis value. |
scale |
Optional Logical: Whether a value axis should avoid forcing zero. |
split_number |
Optional Numeric |
interval |
Optional Numeric |
min_interval |
Optional Numeric |
max_interval |
Optional Numeric |
align_ticks |
Optional Logical: Whether to align ticks with the first axis. |
log_base |
Optional Numeric |
boundary_gap |
Optional Logical, Numeric, or Character: Gap at axis boundaries. Logical (category) or length-2 vector of numbers/strings (numeric axes). |
data |
Optional Vector: Category data. |
axis_line |
Optional AxisLine: Axis line configuration. |
axis_tick |
Optional AxisTick: Axis tick configuration. |
minor_tick |
Optional MinorTick: Minor tick configuration. |
axis_label |
Optional AxisLabel: Axis label configuration. |
split_line |
Optional SplitLine: Split line configuration. |
minor_split_line |
Optional MinorSplitLine: Minor split line configuration. |
split_area |
Optional SplitArea: Split area configuration. |
position |
Optional Character {"left", "right", "top", "bottom"}: Axis position.
For |
grid_index |
Optional Numeric |
Corresponds to AxisBaseOption in src/coord/axisCommonTypes.ts (line 376).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis
Configuration for axis labels. Combines label-specific positioning with text styling (flattened in to_list like LabelOption).
AxisLabel( show = NULL, inside = NULL, rotate = NULL, margin = NULL, formatter = NULL, show_min_label = NULL, show_max_label = NULL, hide_overlap = NULL, interval = NULL, text_style = NULL )AxisLabel( show = NULL, inside = NULL, rotate = NULL, margin = NULL, formatter = NULL, show_min_label = NULL, show_max_label = NULL, hide_overlap = NULL, interval = NULL, text_style = NULL )
show |
Optional Logical: Whether to show axis labels. |
inside |
Optional Logical: Whether labels are inside the grid. |
rotate |
Optional Numeric: Label rotation angle in degrees. |
margin |
Optional Numeric |
formatter |
Optional Character or function: Label formatter. |
show_min_label |
Optional Logical: Whether to show the label at the minimum end. |
show_max_label |
Optional Logical: Whether to show the label at the maximum end. |
hide_overlap |
Optional Logical: Whether to hide overlapping labels. |
interval |
Optional Numeric or Character {"auto"}: Label interval. |
text_style |
Optional TextStyle: Text appearance. |
Corresponds to AxisLabelBaseOption in src/coord/axisCommonTypes.ts (line 312).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.axisLabel
Configuration for the axis line itself.
AxisLine( show = NULL, on_zero = NULL, on_zero_axis_index = NULL, symbol = NULL, symbol_size = NULL, symbol_offset = NULL, line_style = NULL )AxisLine( show = NULL, on_zero = NULL, on_zero_axis_index = NULL, symbol = NULL, symbol_size = NULL, symbol_offset = NULL, line_style = NULL )
show |
Optional Logical or Character {"auto"}: Whether to show the axis line. |
on_zero |
Optional Logical: Whether the axis line is on the zero position of the other axis. |
on_zero_axis_index |
Optional Numeric |
symbol |
Optional Character: Arrow symbols at both ends. |
symbol_size |
Optional Numeric: Arrow symbol size. |
symbol_offset |
Optional Numeric or Character: Arrow symbol offset. |
line_style |
Optional LineStyle: Line styling. |
Corresponds to AxisLineOption in src/coord/axisCommonTypes.ts (line 231).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.axisLine
Configuration for axis tick marks.
AxisTick( show = NULL, inside = NULL, length = NULL, align_with_label = NULL, line_style = NULL )AxisTick( show = NULL, inside = NULL, length = NULL, align_with_label = NULL, line_style = NULL )
show |
Optional Logical or Character {"auto"}: Whether to show ticks. |
inside |
Optional Logical: Whether ticks are inside the grid. |
length |
Optional Numeric |
align_with_label |
Optional Logical: Whether to align ticks with labels. |
line_style |
Optional LineStyle: Line styling. |
Corresponds to AxisTickOption in src/coord/axisCommonTypes.ts (line 244).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.axisTick
Configuration for a bar chart series.
BarSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, stack = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, clip = NULL, bar_width = NULL, bar_max_width = NULL, bar_min_width = NULL, bar_min_height = NULL, bar_gap = NULL, bar_category_gap = NULL, round_cap = NULL, show_background = NULL, item_style = NULL, label = NULL )BarSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, stack = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, clip = NULL, bar_width = NULL, bar_max_width = NULL, bar_min_width = NULL, bar_min_height = NULL, bar_gap = NULL, bar_category_gap = NULL, round_cap = NULL, show_background = NULL, item_style = NULL, label = NULL )
name |
Optional Character: Series name for legend display. |
data |
Optional Vector or list: Data values. |
x_axis_index |
Optional Numeric |
y_axis_index |
Optional Numeric |
stack |
Optional Character: Stack group name. |
silent |
Optional Logical: Whether the series is silent. |
legend_hover_link |
Optional Logical: Whether to highlight related legends on hover. |
color |
Optional Character: Series color override. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same layer. |
clip |
Optional Logical: Whether to clip overflow. |
bar_width |
Optional Numeric or Character: Bar width. |
bar_max_width |
Optional Numeric or Character: Maximum bar width. |
bar_min_width |
Optional Numeric or Character: Minimum bar width. |
bar_min_height |
Optional Numeric |
bar_gap |
Optional Numeric or Character: Gap between bars in the same category. |
bar_category_gap |
Optional Numeric or Character: Gap between categories. |
round_cap |
Optional Logical: Whether to use a round cap. |
show_background |
Optional Logical: Whether to show the bar background. |
item_style |
Optional ItemStyle: Bar styling. |
label |
Optional LabelOption: Data-label configuration. |
Corresponds to BarSeriesOption in src/chart/bar/BarSeries.ts (line 68)
and BaseBarSeriesOption in src/chart/bar/BaseBarSeries.ts (line 38).
ECharts docs: https://echarts.apache.org/en/option.html#series-bar
Configuration for a boxplot chart series.
BoxplotSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, layout = NULL, box_width = NULL, item_style = NULL, label = NULL )BoxplotSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, layout = NULL, box_width = NULL, item_style = NULL, label = NULL )
name |
Optional Character: Series name. |
data |
Optional list: Boxplot data. Each element is |
x_axis_index |
Optional Numeric |
y_axis_index |
Optional Numeric |
silent |
Optional Logical: Whether the series is silent. |
legend_hover_link |
Optional Logical: Whether to highlight related legends on hover. |
color |
Optional Character: Series color override. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same layer. |
layout |
Optional Character {"horizontal", "vertical"}: Layout orientation. |
box_width |
Optional Numeric or Character: Box-width range as a length-2 vector. |
item_style |
Optional ItemStyle: Boxplot styling. |
label |
Optional LabelOption: Data-label configuration. |
Corresponds to BoxplotSeriesOption in src/chart/boxplot/BoxplotSeries.ts (line 59).
ECharts docs: https://echarts.apache.org/en/option.html#series-boxplot
Axis-range zoom component. ECharts renders dataZoom as an array; common
usage pairs a "slider" (visible scrollbar) with an "inside" (mouse-wheel
/ drag) entry targeting the same axis. Unused styling / mouse-behavior
fields stay NULL and are dropped from the serialized output.
DataZoom( type = "slider", id = NULL, disabled = NULL, x_axis_index = NULL, y_axis_index = NULL, radius_axis_index = NULL, angle_axis_index = NULL, single_axis_index = NULL, filter_mode = NULL, start = NULL, end = NULL, start_value = NULL, end_value = NULL, min_span = NULL, max_span = NULL, min_value_span = NULL, max_value_span = NULL, orient = NULL, throttle = NULL, range_mode = NULL, show = NULL, background_color = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, width = NULL, height = NULL, zoom_lock = NULL, zoom_on_mouse_wheel = NULL, move_on_mouse_move = NULL, move_on_mouse_wheel = NULL, prevent_default_mouse_move = NULL )DataZoom( type = "slider", id = NULL, disabled = NULL, x_axis_index = NULL, y_axis_index = NULL, radius_axis_index = NULL, angle_axis_index = NULL, single_axis_index = NULL, filter_mode = NULL, start = NULL, end = NULL, start_value = NULL, end_value = NULL, min_span = NULL, max_span = NULL, min_value_span = NULL, max_value_span = NULL, orient = NULL, throttle = NULL, range_mode = NULL, show = NULL, background_color = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, width = NULL, height = NULL, zoom_lock = NULL, zoom_on_mouse_wheel = NULL, move_on_mouse_move = NULL, move_on_mouse_wheel = NULL, prevent_default_mouse_move = NULL )
type |
Character {"slider", "inside"}: Zoom type. |
id |
Optional Character: Component identifier used for updates. |
disabled |
Optional Logical: Whether the component is disabled. |
x_axis_index |
Optional Numeric, numeric vector, or Character {"all"}: Index of the x-axis (or axes) this zoom targets. |
y_axis_index |
Optional Numeric, numeric vector, or Character {"all"}: Index of the y-axis (or axes) this zoom targets. |
radius_axis_index |
Optional Numeric, numeric vector, or Character {"all"}: Polar radius axis index. |
angle_axis_index |
Optional Numeric, numeric vector, or Character {"all"}: Polar angle axis index. |
single_axis_index |
Optional Numeric, numeric vector, or Character {"all"}: Single-axis index. |
filter_mode |
Optional Character {"filter", "weakFilter", "empty", "none"}: How out-of-window data points are handled. |
start |
Optional Numeric [0, 100]: Left/start position as a percentage of the full data range. |
end |
Optional Numeric [0, 100]: Right/end position as a percentage of the full data range. |
start_value |
Optional Numeric, Character, or Date: Absolute start
value (alternative to |
end_value |
Optional Numeric, Character, or Date: Absolute end value
(alternative to |
min_span |
Optional Numeric [0, 100]: Minimum window size, as a percentage. |
max_span |
Optional Numeric [0, 100]: Maximum window size, as a percentage. |
min_value_span |
Optional Numeric or Character: Minimum window size in data units. |
max_value_span |
Optional Numeric or Character: Maximum window size in data units. |
orient |
Optional Character {"horizontal", "vertical"}: Layout orientation. Defaults are inferred from the axis the zoom targets. |
throttle |
Optional Numeric [0, Inf): Throttle delay in milliseconds for zoom events. |
range_mode |
Optional length-2 Character vector of {"value", "percent"}: Per-boundary interpretation for start/end. |
show |
Optional Logical: Whether the slider is visible (slider type only). |
background_color |
Optional Character: Slider background color. |
left |
Optional Numeric or Character: Slider left position. |
right |
Optional Numeric or Character: Slider right position. |
top |
Optional Numeric or Character: Slider top position. |
bottom |
Optional Numeric or Character: Slider bottom position. |
width |
Optional Numeric or Character: Slider width. |
height |
Optional Numeric or Character: Slider height. |
zoom_lock |
Optional Logical: Whether to lock the window size (allow move but not zoom). |
zoom_on_mouse_wheel |
Optional Logical or Character {"shift", "ctrl", "alt"}: Whether/how the mouse wheel zooms (inside type only). |
move_on_mouse_move |
Optional Logical or Character {"shift", "ctrl", "alt"}: Whether/how mouse drag pans (inside type only). |
move_on_mouse_wheel |
Optional Logical or Character {"shift", "ctrl", "alt"}: Whether/how the mouse wheel pans (inside type only). |
prevent_default_mouse_move |
Optional Logical: Whether to call
|
Corresponds to DataZoomOption in
src/component/dataZoom/DataZoomModel.ts (line 38),
SliderDataZoomOption in src/component/dataZoom/SliderZoomModel.ts
(line 38), and InsideDataZoomOption in
src/component/dataZoom/InsideZoomModel.ts (line 23).
ECharts docs: https://echarts.apache.org/en/option.html#dataZoom
Low-level function that takes an EChartsOption (or a plain list) and renders it as an interactive htmlwidget.
draw( option, theme = NULL, renderer = "canvas", width = NULL, height = NULL, elementId = NULL, filename = NULL, meta = list() )draw( option, theme = NULL, renderer = "canvas", width = NULL, height = NULL, elementId = NULL, filename = NULL, meta = list() )
option |
EChartsOption or named list: Option object to render. |
theme |
Optional Theme, list, or |
renderer |
Character {"canvas", "svg"}: Rendering engine. |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
elementId |
Optional Character: Explicit element ID. |
filename |
Optional Character: If provided, the widget is also written to
this file via |
meta |
Optional named list: Extra fields merged into the widget payload.
Used internally (e.g. by |
htmlwidget: Widget object.
Renders an A3 object (from rtemis.a3) as an interactive ECharts
amino-acid sequence diagram. The sequence is wrapped into rows in a
meander/serpentine path, with optional site, region, PTM, processing, and
variant annotations overlaid as distinct series and collected in a
vertical legend.
draw_a3( x, n_per_row = 21L, residue_spacing = 0.3, marker_size = 28, font_size = 18, line_width = 2, show_markers = TRUE, show_labels = TRUE, position_every = 10L, region_opacity = 0.35, ptm_placement = "radial", residue_fill = "#E7E5E4", residue_stroke = "#44403C", label_color = "#1C1917", pos_label_color = "#78716C", variant_color = "#FA6E1E", disease_variant_color = "#E266AE", enable_zoom = TRUE, title = NULL, grid = NULL, theme = NULL, width = NULL, height = NULL, filename = NULL )draw_a3( x, n_per_row = 21L, residue_spacing = 0.3, marker_size = 28, font_size = 18, line_width = 2, show_markers = TRUE, show_labels = TRUE, position_every = 10L, region_opacity = 0.35, ptm_placement = "radial", residue_fill = "#E7E5E4", residue_stroke = "#44403C", label_color = "#1C1917", pos_label_color = "#78716C", variant_color = "#FA6E1E", disease_variant_color = "#E266AE", enable_zoom = TRUE, title = NULL, grid = NULL, theme = NULL, width = NULL, height = NULL, filename = NULL )
x |
|
n_per_row |
Integer |
residue_spacing |
Numeric |
marker_size |
Numeric |
font_size |
Numeric |
line_width |
Numeric |
show_markers |
Logical: Whether to render the backbone line and residue circles. |
show_labels |
Logical: Whether to render single-letter residue labels. |
position_every |
Optional Integer |
region_opacity |
Numeric |
ptm_placement |
Character |
residue_fill |
Character: Residue circle fill color. |
residue_stroke |
Character: Residue circle stroke and backbone line color. |
label_color |
Character: Default residue label text color. |
pos_label_color |
Character: Position label text color. |
variant_color |
Character: Label color for variant residues. |
disease_variant_color |
Character: Label color for disease-associated
variant residues (takes precedence over |
enable_zoom |
Logical: Whether to enable Shift+scroll zoom. |
title |
Optional Character: Chart title. |
grid |
Optional Grid: Override any plot-area margin. The defaults
( |
theme |
Optional Theme: Theme override. |
width |
Optional Numeric or Character: Widget width. |
height |
Optional Numeric or Character: Widget height. Auto-computed
from layout bounds and |
filename |
Optional Character: If provided, save the widget to this
file via |
Corresponds to createA3EChartsOption() in
src/lib/a3/visualization/echarts.ts.
htmlwidget: Widget object.
if (requireNamespace("rtemis.a3", quietly = TRUE)) { a <- rtemis.a3::create_A3( "MAEPRQEFEVMEDHAGTYGLGDRK", site = list( Active_site = rtemis.a3::annotation_position(c(5L, 17L)) ), region = list( Domain = rtemis.a3::annotation_range( matrix(c(3L, 10L, 15L, 22L), ncol = 2, byrow = TRUE) ) ) ) draw_a3(a) }if (requireNamespace("rtemis.a3", quietly = TRUE)) { a <- rtemis.a3::create_A3( "MAEPRQEFEVMEDHAGTYGLGDRK", site = list( Active_site = rtemis.a3::annotation_position(c(5L, 17L)) ), region = list( Domain = rtemis.a3::annotation_range( matrix(c(3L, 10L, 15L, 22L), ncol = 2, byrow = TRUE) ) ) ) draw_a3(a) }
Quick bar chart from x/y data.
draw_bar( x, y, color = NULL, stack = FALSE, horizontal = FALSE, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )draw_bar( x, y, color = NULL, stack = FALSE, horizontal = FALSE, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )
x |
Character: Category labels. |
y |
Numeric or named list: Bar heights. |
color |
Optional Character: Bar color or colors. For multiple series,
colors are applied per series and recycled as needed. For a single series,
a single color styles the whole series; multiple colors are recycled
across individual bars. |
stack |
Logical: Whether to stack bars. |
horizontal |
Logical: Whether to draw horizontal bars. |
xlab |
Optional Character: X-axis title (bottom axis). |
ylab |
Optional Character: Y-axis title (left axis). |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. The palette inside the theme can be
overridden per-chart with the |
margins |
Optional Named numeric vector or named list: Plot margins in
pixels (or percentage strings) for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Quick boxplot from raw data with optional grouping for multiple traces.
Boxplot statistics (min, Q1, median, Q3, max) are computed automatically
using grDevices::boxplot.stats().
draw_boxplot( data, labels = NULL, group = NULL, horizontal = FALSE, color = NULL, fill_alpha = 0.25, na.rm = TRUE, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, verbosity = 1L, filename = NULL )draw_boxplot( data, labels = NULL, group = NULL, horizontal = FALSE, color = NULL, fill_alpha = 0.25, na.rm = TRUE, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, verbosity = 1L, filename = NULL )
data |
Numeric or list: A list of numeric vectors (one per box), or a single numeric
vector when |
labels |
Optional Character: Category labels for each box. Ignored when |
group |
Optional Vector: Grouping variable. When provided, |
horizontal |
Logical: Whether to draw horizontal boxplots. |
color |
Optional Character: Box color or colors. For ungrouped boxplots, a single color used at
full opacity for borders and at |
fill_alpha |
Numeric |
na.rm |
Logical: Whether to remove |
xlab |
Optional Character: X-axis title (bottom axis). Overrides the
value-axis name inferred from a single-element named list passed as |
ylab |
Optional Character: Y-axis title (left axis). Overrides the
value-axis name inferred from a single-element named list passed as |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. |
margins |
Optional Named numeric vector or named list: Plot margins in
pixels (or percentage strings) for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
verbosity |
Integer |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Kernel density estimation plot from numeric data, with optional grouping
for multiple traces. A list input creates one density trace per vector when
ungrouped, or one trace per variable/group combination when group is
supplied.
draw_density( x, group = NULL, n = 512, bw = "nrd0", na.rm = TRUE, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, verbosity = 1L, filename = NULL )draw_density( x, group = NULL, n = 512, bw = "nrd0", na.rm = TRUE, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, verbosity = 1L, filename = NULL )
x |
Numeric or list: Values used for density estimation. An ungrouped
list creates one density trace per element; with |
group |
Optional Vector: Grouping variable for multiple density traces. |
n |
Numeric |
bw |
Character or Numeric: Bandwidth passed to |
na.rm |
Logical: Whether to remove |
xlab |
Optional Character: X-axis title. |
ylab |
Optional Character: Y-axis title. |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. |
margins |
Optional Named numeric vector or named list: Plot margins in
pixels (or percentage strings) for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
verbosity |
Integer |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Quick heatmap from a numeric matrix. Designed to handle all common use cases including correlation matrices (square cells, diverging color scale), general rectangular heatmaps, and clustered heatmaps.
draw_heatmap( x, row_names = NULL, col_names = NULL, triangle = NULL, cluster_rows = FALSE, cluster_cols = FALSE, dist_method = "euclidean", hclust_method = "complete", show_row_dendro = TRUE, show_col_dendro = TRUE, dendro_row_width = 60, dendro_col_height = 60, dendro_color = NULL, dendro_uniform = FALSE, dendro_row_side = "right", dendro_col_side = "top", square_cells = NULL, color = NULL, zlim = NULL, show_values = FALSE, value_digits = 2L, show_colorbar = TRUE, colorbar_orient = "vertical", title = NULL, theme = NULL, margins = NULL, width = NULL, height = NULL, filename = NULL )draw_heatmap( x, row_names = NULL, col_names = NULL, triangle = NULL, cluster_rows = FALSE, cluster_cols = FALSE, dist_method = "euclidean", hclust_method = "complete", show_row_dendro = TRUE, show_col_dendro = TRUE, dendro_row_width = 60, dendro_col_height = 60, dendro_color = NULL, dendro_uniform = FALSE, dendro_row_side = "right", dendro_col_side = "top", square_cells = NULL, color = NULL, zlim = NULL, show_values = FALSE, value_digits = 2L, show_colorbar = TRUE, colorbar_orient = "vertical", title = NULL, theme = NULL, margins = NULL, width = NULL, height = NULL, filename = NULL )
x |
Numeric matrix: Input data. Rows map to y-axis categories and columns to x-axis categories. |
row_names |
Optional Character: Row labels. Defaults to |
col_names |
Optional Character: Column labels. Defaults to |
triangle |
Optional Character {"upper", "lower"}: Mask one triangle of the
matrix to |
cluster_rows |
Logical: Whether to reorder rows via hierarchical clustering. |
cluster_cols |
Logical: Whether to reorder columns via hierarchical clustering. |
dist_method |
Character: Distance method passed to |
hclust_method |
Character: Linkage method passed to |
show_row_dendro |
Logical: Whether to render the row dendrogram panel
when |
show_col_dendro |
Logical: Whether to render the col dendrogram panel
when |
dendro_row_width |
Optional Numeric |
dendro_col_height |
Optional Numeric |
dendro_color |
Optional Character: Stroke color for dendrogram branch
lines. |
dendro_uniform |
Logical: Whether to render dendrograms with uniform level
heights — each merge step occupies equal visual space — rather than heights
proportional to actual merge distances. |
dendro_row_side |
Character {"right", "left"}: Side of the heatmap on which
the row dendrogram is placed. |
dendro_col_side |
Character {"top", "bottom"}: Side of the heatmap on which
the column dendrogram is placed. |
square_cells |
Optional Logical: Whether to compute widget dimensions so
cells are square. |
color |
Optional Character: Color palette — a vector of 2 or more colors
defining the continuous color scale from |
zlim |
Optional Numeric: Length-2 vector |
show_values |
Logical: Whether to print the cell value as a label inside each cell. |
value_digits |
Integer: Decimal places used in cell labels and the tooltip. |
show_colorbar |
Logical: Whether to display the continuous color-scale bar. |
colorbar_orient |
Character {"vertical", "horizontal"}: Orientation of the color bar. |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. |
margins |
Optional Named numeric vector or named list: Override the
auto-computed heatmap plot-area margins in pixels (or percentage strings)
for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file via
|
Color encoding is driven by a continuous VisualMap component.
Hierarchical clustering is performed in R via hclust(); rows and columns
are reordered accordingly. When cluster_rows or cluster_cols is TRUE
(and the corresponding show_*_dendro flag is not FALSE), a dendrogram
panel is rendered alongside the heatmap as an ECharts custom series.
htmlwidget: Widget object.
Histogram from numeric data, with optional grouping for multiple traces.
Bins are computed using graphics::hist() with consistent break points
across groups.
draw_histogram( x, group = NULL, breaks = "Sturges", xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )draw_histogram( x, group = NULL, breaks = "Sturges", xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )
x |
Numeric: Values used for histogram binning. |
group |
Optional Vector: Grouping variable for multiple series. |
breaks |
Numeric, Character, or Numeric vector: Binning method. A single number (number of bins), a character
string naming an algorithm (e.g. |
xlab |
Optional Character: X-axis title. |
ylab |
Optional Character: Y-axis title. |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. |
margins |
Optional Named numeric vector or named list: Plot margins in
pixels (or percentage strings) for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Quick line chart from x/y data.
draw_line( x, y, names = NULL, smooth = FALSE, area = FALSE, points = TRUE, blocks = NULL, block_color = NULL, block_opacity = 0.2, color = NULL, line_style = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, zoom = FALSE, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )draw_line( x, y, names = NULL, smooth = FALSE, area = FALSE, points = TRUE, blocks = NULL, block_color = NULL, block_opacity = 0.2, color = NULL, line_style = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, zoom = FALSE, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )
x |
Vector: X-axis values. |
y |
Numeric or named list: Y values. |
names |
Optional Character: Series names used when |
smooth |
Logical: Whether to smooth lines. |
area |
Logical: Whether to show area fill. |
points |
Logical: Whether to show point markers on each data value.
Defaults to |
blocks |
Optional factor, integer, character, or logical of length
|
block_color |
Optional Character vector or list of length k, where
k is the number of unique levels in |
block_opacity |
Numeric [0, 1]: Fill opacity applied to all bands.
Defaults to |
color |
Optional Character: Series color palette — a single color string or
character vector that overrides the theme palette for this chart.
|
line_style |
Optional Character {"solid", "dashed", "dotted"}: Line dash style — one value per series, recycled to match the number of series. |
xlim |
Optional Numeric [length 2]: X-axis limits |
ylim |
Optional Numeric [length 2]: Y-axis limits |
xlab |
Optional Character: X-axis title. |
ylab |
Optional Character: Y-axis title. |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. The palette inside the theme can be
overridden per-chart with the |
zoom |
Logical, DataZoom, or list of DataZoom: Enable x-axis zoom.
|
margins |
Optional Named numeric vector or named list: Plot margins in
pixels (or percentage strings) for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Quick pie chart from values and labels.
draw_pie( values, labels, radius = "75%", rose_type = NULL, color = NULL, title = NULL, theme = NULL, width = NULL, height = NULL, filename = NULL )draw_pie( values, labels, radius = "75%", rose_type = NULL, color = NULL, title = NULL, theme = NULL, width = NULL, height = NULL, filename = NULL )
values |
Numeric: Slice values. |
labels |
Character: Slice labels. |
radius |
Numeric or Character: Pie radius. |
rose_type |
Optional Character {"radius", "area"}: Nightingale chart type. |
color |
Optional Character: Series color palette — a single color string or
character vector that overrides the theme palette for this chart.
|
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. The palette inside the theme can be
overridden per-chart with the |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Sankey diagram from a data frame of directed links. Node names are derived
automatically from the unique values in the source and target columns;
no separate node list is required.
draw_sankey( links, orient = "horizontal", node_width = NULL, node_gap = NULL, node_align = NULL, title = NULL, color = NULL, theme = NULL, width = NULL, height = NULL, filename = NULL )draw_sankey( links, orient = "horizontal", node_width = NULL, node_gap = NULL, node_align = NULL, title = NULL, color = NULL, theme = NULL, width = NULL, height = NULL, filename = NULL )
links |
data.frame: Directed links with columns |
orient |
Optional Character {"horizontal", "vertical"}: Flow direction. |
node_width |
Optional Numeric |
node_gap |
Optional Numeric |
node_align |
Optional Character {"justify", "left", "right"}: Node alignment within each column. |
title |
Optional Character: Chart title. |
color |
Optional Character: Node color palette — a single color string or a character vector that overrides the theme palette for this chart. |
theme |
Optional Theme: Theme override. |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file
via |
htmlwidget: Widget object.
links <- data.frame( source = c("A", "A", "B", "C"), target = c("B", "C", "D", "D"), value = c(8, 4, 6, 3) ) draw_sankey(links)links <- data.frame( source = c("A", "A", "B", "C"), target = c("B", "C", "D", "D"), value = c(8, 4, 6, 3) ) draw_sankey(links)
Quick scatter plot from x/y data with optional fitted line and confidence band.
draw_scatter( x, y, size = NULL, group = NULL, fit = NULL, se = TRUE, fit_alpha = 0.25, n_fit = 200, color = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )draw_scatter( x, y, size = NULL, group = NULL, fit = NULL, se = TRUE, fit_alpha = 0.25, n_fit = 200, color = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, title = NULL, theme = NULL, margins = DEFAULT_MARGINS, width = NULL, height = NULL, filename = NULL )
x |
Numeric: X values. |
y |
Numeric: Y values. |
size |
Optional Numeric: Symbol sizes. |
group |
Optional Vector: Grouping variable for multiple series. |
fit |
Optional Character {"glm", "gam"}: Fit method. |
se |
Logical: Whether to show the confidence band. |
fit_alpha |
Numeric |
n_fit |
Numeric |
color |
Optional Character: Series color palette — a single color string or
character vector that overrides the theme palette for this chart.
When |
xlim |
Optional Numeric [length 2]: X-axis limits |
ylim |
Optional Numeric [length 2]: Y-axis limits |
xlab |
Optional Character: X-axis title. |
ylab |
Optional Character: Y-axis title. |
title |
Optional Character: Chart title. |
theme |
Optional Theme: Theme override. The palette inside the theme can be
overridden per-chart with the |
margins |
Optional Named numeric vector or named list: Plot margins in
pixels (or percentage strings) for any of |
width |
Optional Character or Numeric: Widget width. |
height |
Optional Character or Numeric: Widget height. |
filename |
Optional Character: If provided, save the widget to this file via
|
htmlwidget: Widget object.
Renders an interactive time-frequency spectrogram as an ECharts heatmap
widget. Accepts either a raw signal vector (STFT is computed internally via
signal::specgram()) or a pre-computed spectrogram matrix (freq x time).
draw_spectrogram( x, sample_rate = NULL, time = NULL, frequency = NULL, n_fft = 256L, window = "hann", overlap = NULL, power = TRUE, db = TRUE, db_range = 80, freq_scale = "linear", freq_range = NULL, freq_unit = "Hz", time_range = NULL, time_unit = "s", palette = "magma", palette_reverse = FALSE, n_colors = 256L, zlim = NULL, show_colorbar = TRUE, colorbar_title = NULL, title = NULL, xlab = NULL, ylab = NULL, theme = NULL, margins = NULL, width = NULL, height = NULL, filename = NULL )draw_spectrogram( x, sample_rate = NULL, time = NULL, frequency = NULL, n_fft = 256L, window = "hann", overlap = NULL, power = TRUE, db = TRUE, db_range = 80, freq_scale = "linear", freq_range = NULL, freq_unit = "Hz", time_range = NULL, time_unit = "s", palette = "magma", palette_reverse = FALSE, n_colors = 256L, zlim = NULL, show_colorbar = TRUE, colorbar_title = NULL, title = NULL, xlab = NULL, ylab = NULL, theme = NULL, margins = NULL, width = NULL, height = NULL, filename = NULL )
x |
Numeric matrix (freq x time) or numeric vector (raw signal).
A matrix is used directly; |
sample_rate |
Optional Numeric |
time |
Optional Numeric: Time axis values in seconds, length |
frequency |
Optional Numeric: Frequency axis values in Hz, length
|
n_fft |
Integer |
window |
Character {"hann", "hamming", "blackman", "bartlett",
"rectangular"} or Numeric: Window function name or a pre-built window
vector. Passed to |
overlap |
Optional Integer |
power |
Logical: Treat spectral values as power ( |
db |
Logical: Convert to dB. For power: |
db_range |
Numeric |
freq_scale |
Character {"linear", "log"}: Frequency axis scale. With
|
freq_range |
Optional Numeric[2]: Frequency range to display in Hz,
e.g. |
freq_unit |
Character {"Hz", "kHz"}: Unit for the frequency axis. |
time_range |
Optional Numeric[2]: Time range to display in seconds. |
time_unit |
Character {"s", "ms"}: Unit for the time axis. |
palette |
Character: Colour palette. Accepts a viridisLite palette
name ( |
palette_reverse |
Logical: Reverse the palette direction. |
n_colors |
Integer |
zlim |
Optional Numeric[2]: Colour-scale limits after all transformations (dB clipping, unit conversion). Defaults to the data range. |
show_colorbar |
Logical: Show the continuous visual-map colorbar. |
colorbar_title |
Optional Character: Colorbar label. Default: |
title |
Optional Character: Chart title. |
xlab |
Optional Character: X-axis label. Default: |
ylab |
Optional Character: Y-axis label. Default: |
theme |
Optional Theme, list, or |
margins |
Optional Named numeric or character vector / list: Plot
margins in pixels. Valid names: |
width |
Optional Numeric or Character: Widget width. |
height |
Optional Numeric or Character: Widget height. |
filename |
Optional Character: If provided, the widget is saved via
|
Corresponds to HeatmapSeriesOption in src/chart/heatmap/HeatmapSeries.ts.
ECharts docs: https://echarts.apache.org/en/option.html#series-heatmap
htmlwidget
if (requireNamespace("signal", quietly = TRUE)) { t_vec <- seq(0, 2, by = 1 / 8000) sig <- signal::chirp(t_vec, 200, 2, 2000) draw_spectrogram(sig, sample_rate = 8000) }if (requireNamespace("signal", quietly = TRUE)) { t_vec <- seq(0, 2, by = 1 / 8000) sig <- signal::chirp(t_vec, 200, 2, 2000) draw_spectrogram(sig, sample_rate = 8000) }
Shiny output for draw widget
drawOutput(outputId, width = "100%", height = "400px")drawOutput(outputId, width = "100%", height = "400px")
outputId |
Character: Shiny output ID. |
width |
Character or Numeric: CSS width. |
height |
Character or Numeric: CSS height. |
The top-level configuration object passed to echarts.setOption().
Holds all chart components, series, and global settings.
EChartsOption( title = NULL, legend = NULL, grid = NULL, x_axis = NULL, y_axis = NULL, tooltip = NULL, visual_map = NULL, data_zoom = NULL, series = NULL, color = NULL, background_color = NULL, text_style = NULL, animation = NULL, animation_threshold = NULL, animation_duration = NULL, animation_easing = NULL, animation_delay = NULL, dark_mode = NULL, use_utc = NULL )EChartsOption( title = NULL, legend = NULL, grid = NULL, x_axis = NULL, y_axis = NULL, tooltip = NULL, visual_map = NULL, data_zoom = NULL, series = NULL, color = NULL, background_color = NULL, text_style = NULL, animation = NULL, animation_threshold = NULL, animation_duration = NULL, animation_easing = NULL, animation_delay = NULL, dark_mode = NULL, use_utc = NULL )
title |
Optional Title or list: Title configuration. |
legend |
Optional Legend or list: Legend configuration. |
grid |
Optional Grid or list: Grid configuration. |
x_axis |
Optional Axis or list: X-axis configuration ( |
y_axis |
Optional Axis or list: Y-axis configuration ( |
tooltip |
Optional Tooltip: Tooltip configuration. |
visual_map |
Optional VisualMap or list: Visual map configuration ( |
data_zoom |
Optional DataZoom or list of DataZoom: Axis zoom
component(s) ( |
series |
Optional series object or list: Series configuration (LineSeries, BarSeries, ScatterSeries, PieSeries, BoxplotSeries, HeatmapSeries). |
color |
Optional Character: Color palette. |
background_color |
Optional Character: Chart background color. |
text_style |
Optional TextStyle: Global default text style. |
animation |
Optional Logical: Whether to enable animation. |
animation_threshold |
Optional Numeric |
animation_duration |
Optional Numeric |
animation_easing |
Optional Character: Animation easing function name. |
animation_delay |
Optional Numeric |
dark_mode |
Optional Logical or Character {"auto"}: Dark-mode setting. |
use_utc |
Optional Logical: Whether to use UTC for time axes. |
Corresponds to EChartsOption in src/export/option.ts (line 258)
and ECUnitOption in src/util/types.ts (line 697).
Configuration for the cartesian coordinate grid container.
Grid( show = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, width = NULL, height = NULL, contain_label = NULL, background_color = NULL, border_width = NULL, border_color = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )Grid( show = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, width = NULL, height = NULL, contain_label = NULL, background_color = NULL, border_width = NULL, border_color = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )
show |
Optional Logical: Whether to show the grid border. |
left |
Optional Numeric or Character: Distance from the left side of the container. |
right |
Optional Numeric or Character: Distance from the right side of the container. |
top |
Optional Numeric or Character: Distance from the top of the container. |
bottom |
Optional Numeric or Character: Distance from the bottom of the container. |
width |
Optional Numeric or Character: Grid width. |
height |
Optional Numeric or Character: Grid height. |
contain_label |
Optional Logical: Whether the grid region contains axis labels. |
background_color |
Optional Character: Grid background color. |
border_width |
Optional Numeric |
border_color |
Optional Character: Grid border color. |
shadow_blur |
Optional Numeric |
shadow_color |
Optional Character: Shadow color. |
shadow_offset_x |
Optional Numeric: Shadow horizontal offset. |
shadow_offset_y |
Optional Numeric: Shadow vertical offset. |
Corresponds to GridOption in src/coord/cartesian/GridModel.ts (line 37).
ECharts docs: https://echarts.apache.org/en/option.html#grid
Configuration for a heatmap chart series on Cartesian coordinates.
Each data point is a triple [col_index, row_index, value] and color
encoding is driven by a VisualMap component.
HeatmapSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, silent = NULL, legend_hover_link = NULL, z_level = NULL, z = NULL, label = NULL, item_style = NULL, emphasis = NULL )HeatmapSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, silent = NULL, legend_hover_link = NULL, z_level = NULL, z = NULL, label = NULL, item_style = NULL, emphasis = NULL )
name |
Optional Character: Series name. |
data |
Optional list: Heatmap data. Each element is a length-3 list
|
x_axis_index |
Optional Numeric |
y_axis_index |
Optional Numeric |
silent |
Optional Logical: Whether the series is silent (no events). |
legend_hover_link |
Optional Logical: Whether to link hover with the legend. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same layer. |
label |
Optional LabelOption: Cell label configuration (e.g. show the value). |
item_style |
Optional ItemStyle: Cell styling (e.g. border color/width). |
emphasis |
Optional list: Emphasis (hover) styling. A plain list passed
through to ECharts, e.g. |
Corresponds to HeatmapSeriesOption in src/chart/heatmap/HeatmapSeries.ts.
ECharts docs: https://echarts.apache.org/en/option.html#series-heatmap
Styling for graphical items (bar segments, scatter points, pie slices, etc.). Includes both fill and stroke options.
ItemStyle( color = NULL, opacity = NULL, border_color = NULL, border_width = NULL, border_type = NULL, border_cap = NULL, border_join = NULL, border_dash_offset = NULL, border_miter_limit = NULL, border_radius = NULL, decal = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )ItemStyle( color = NULL, opacity = NULL, border_color = NULL, border_width = NULL, border_type = NULL, border_cap = NULL, border_join = NULL, border_dash_offset = NULL, border_miter_limit = NULL, border_radius = NULL, decal = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )
color |
Optional Character: CSS fill color. |
opacity |
Optional Numeric |
border_color |
Optional Character: Border color. |
border_width |
Optional Numeric |
border_type |
Optional Character {"solid", "dashed", "dotted"}: Border line type. |
border_cap |
Optional Character {"butt", "round", "square"}: Border line cap. |
border_join |
Optional Character {"bevel", "round", "miter"}: Border line join. |
border_dash_offset |
Optional Numeric: Border dash offset. |
border_miter_limit |
Optional Numeric |
border_radius |
Optional Numeric, Character, or Numeric vector: Corner border radius. |
decal |
Optional Any: Decal pattern for accessibility. |
shadow_blur |
Optional Numeric |
shadow_color |
Optional Character: Shadow color. |
shadow_offset_x |
Optional Numeric: Shadow horizontal offset. |
shadow_offset_y |
Optional Numeric: Shadow vertical offset. |
Corresponds to ItemStyleOption in src/util/types.ts (line 1142).
ECharts docs: https://echarts.apache.org/en/option.html#series-bar.itemStyle
Connecting line between a label and its chart element (e.g. pie label lines).
LabelLine( show = NULL, show_above = NULL, length = NULL, length2 = NULL, smooth = NULL, min_turn_angle = NULL, line_style = NULL )LabelLine( show = NULL, show_above = NULL, length = NULL, length2 = NULL, smooth = NULL, min_turn_angle = NULL, line_style = NULL )
show |
Optional Logical: Whether to show the label line. |
show_above |
Optional Logical: Whether the line renders above other elements. |
length |
Optional Numeric |
length2 |
Optional Numeric |
smooth |
Optional Numeric |
min_turn_angle |
Optional Numeric: Minimum angle for turning the line. |
line_style |
Optional LineStyle: Line styling. |
Corresponds to LabelLineOption in src/util/types.ts (line 1379).
ECharts docs: https://echarts.apache.org/en/option.html#series-pie.labelLine
Text label configuration for chart elements. Combines label-specific positioning (show, position, distance, rotate) with text styling.
LabelOption( show = NULL, position = NULL, distance = NULL, rotate = NULL, offset = NULL, formatter = NULL, silent = NULL, precision = NULL, value_animation = NULL, min_margin = NULL, text_style = NULL )LabelOption( show = NULL, position = NULL, distance = NULL, rotate = NULL, offset = NULL, formatter = NULL, silent = NULL, precision = NULL, value_animation = NULL, min_margin = NULL, text_style = NULL )
show |
Optional Logical: Whether to show the label. |
position |
Optional Character {"top", "left", "right", "bottom", "inside", "insideLeft", "insideRight", "insideTop", "insideBottom", "insideTopLeft", "insideBottomLeft", "insideTopRight", "insideBottomRight", "outside"} or Numeric: Label position.
|
distance |
Optional Numeric: Distance from the element. |
rotate |
Optional Numeric: Rotation angle in degrees. |
offset |
Optional Numeric: Offset |
formatter |
Optional Character or function: Label text formatter. |
silent |
Optional Logical: Whether the label is silent. |
precision |
Optional Numeric or Character {"auto"}: Numeric precision. |
value_animation |
Optional Logical: Whether to animate value changes. |
min_margin |
Optional Numeric |
text_style |
Optional TextStyle: Text appearance. |
Corresponds to SeriesLabelOption / LabelOption in src/util/types.ts
(line 1283, 1348).
ECharts docs: https://echarts.apache.org/en/option.html#series-bar.label
Legend configuration for selecting/filtering series.
Legend( show = NULL, orient = NULL, align = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, width = NULL, height = NULL, padding = NULL, item_gap = NULL, item_width = NULL, item_height = NULL, icon = NULL, selected_mode = NULL, selected = NULL, formatter = NULL, inactive_color = NULL, inactive_border_color = NULL, text_style = NULL, item_style = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_radius = NULL, trigger_event = NULL, data = NULL )Legend( show = NULL, orient = NULL, align = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, width = NULL, height = NULL, padding = NULL, item_gap = NULL, item_width = NULL, item_height = NULL, icon = NULL, selected_mode = NULL, selected = NULL, formatter = NULL, inactive_color = NULL, inactive_border_color = NULL, text_style = NULL, item_style = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_radius = NULL, trigger_event = NULL, data = NULL )
show |
Optional Logical: Whether to show the legend. |
orient |
Optional Character {"horizontal", "vertical"}: Layout orientation. |
align |
Optional Character {"auto", "left", "right"}: Marker and text alignment. |
left |
Optional Numeric or Character: Left position. |
right |
Optional Numeric or Character: Right position. |
top |
Optional Numeric or Character: Top position. |
bottom |
Optional Numeric or Character: Bottom position. |
width |
Optional Numeric or Character: Legend box width. |
height |
Optional Numeric or Character: Legend box height. |
padding |
Optional Numeric: Padding inside the legend box. |
item_gap |
Optional Numeric |
item_width |
Optional Numeric |
item_height |
Optional Numeric |
icon |
Optional Character: Default legend icon. |
selected_mode |
Optional Logical or Character {"single", "multiple"}: Selection mode. |
selected |
Optional Named logical vector: Pre-selected items. |
formatter |
Optional Character or function: Label formatter. |
inactive_color |
Optional Character: Color for unselected items. |
inactive_border_color |
Optional Character: Border color for unselected items. |
text_style |
Optional TextStyle: Legend label text style. |
item_style |
Optional ItemStyle: Legend icon style. |
background_color |
Optional Character: Background color. |
border_color |
Optional Character: Border color. |
border_width |
Optional Numeric |
border_radius |
Optional Numeric: Border radius. |
trigger_event |
Optional Logical: Whether the legend emits events. |
data |
Optional Character vector or list: Legend data items. |
Corresponds to LegendOption in src/component/legend/LegendModel.ts (line 162).
ECharts docs: https://echarts.apache.org/en/option.html#legend
Configuration for a line chart series.
LineSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, stack = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, smooth = NULL, step = NULL, connect_nulls = NULL, clip = NULL, show_symbol = NULL, symbol = NULL, symbol_size = NULL, line_style = NULL, area_style = NULL, item_style = NULL, label = NULL, mark_area = NULL )LineSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, stack = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, smooth = NULL, step = NULL, connect_nulls = NULL, clip = NULL, show_symbol = NULL, symbol = NULL, symbol_size = NULL, line_style = NULL, area_style = NULL, item_style = NULL, label = NULL, mark_area = NULL )
name |
Optional Character: Series name for legend display. |
data |
Optional Numeric or list: Data values. |
x_axis_index |
Optional Numeric |
y_axis_index |
Optional Numeric |
stack |
Optional Character: Stack group name. |
silent |
Optional Logical: Whether the series is silent. |
legend_hover_link |
Optional Logical: Whether to highlight related legends on hover. |
color |
Optional Character: Series color override. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same layer. |
smooth |
Optional Logical or Numeric |
step |
Optional Logical or Character {"start", "end", "middle"}: Step line mode. |
connect_nulls |
Optional Logical: Whether to connect across |
clip |
Optional Logical: Whether to clip overflow. |
show_symbol |
Optional Logical: Whether to show data-point symbols. |
symbol |
Optional Character {"circle", "rect", "roundRect", "triangle", "diamond", "pin", "arrow", "none"}: Symbol type.
|
symbol_size |
Optional Numeric: Symbol size in pixels. |
line_style |
Optional LineStyle: Line styling. |
area_style |
Optional AreaStyle: Area fill styling. |
item_style |
Optional ItemStyle: Data-point marker styling. |
label |
Optional LabelOption: Data-label configuration. |
mark_area |
Optional MarkArea: Shaded bands (e.g. vertical highlight regions across x-ranges). |
Corresponds to LineSeriesOption in src/chart/line/LineSeries.ts (line 74).
ECharts docs: https://echarts.apache.org/en/option.html#series-line
Stroke styling for lines in series, axes, and components.
LineStyle( color = NULL, width = NULL, opacity = NULL, type = NULL, cap = NULL, join = NULL, dash_offset = NULL, miter_limit = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )LineStyle( color = NULL, width = NULL, opacity = NULL, type = NULL, cap = NULL, join = NULL, dash_offset = NULL, miter_limit = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )
color |
Optional Character: CSS line color. |
width |
Optional Numeric |
opacity |
Optional Numeric |
type |
Optional Character {"solid", "dashed", "dotted"}: Line type. |
cap |
Optional Character {"butt", "round", "square"}: Line cap. |
join |
Optional Character {"bevel", "round", "miter"}: Line join. |
dash_offset |
Optional Numeric: Dash offset for dashed lines. |
miter_limit |
Optional Numeric |
shadow_blur |
Optional Numeric |
shadow_color |
Optional Character: Shadow color. |
shadow_offset_x |
Optional Numeric: Shadow horizontal offset. |
shadow_offset_y |
Optional Numeric: Shadow vertical offset. |
Corresponds to LineStyleOption in src/util/types.ts (line 1154).
ECharts docs: https://echarts.apache.org/en/option.html#series-line.lineStyle
Container for markArea bands attached to a series. data is a list where
each element is a length-2 list of MarkAreaDataPoint (or plain named list)
defining the two opposite corners of one band.
MarkArea( data = NULL, silent = NULL, precision = NULL, item_style = NULL, label = NULL, z2 = NULL )MarkArea( data = NULL, silent = NULL, precision = NULL, item_style = NULL, label = NULL, z2 = NULL )
data |
Optional list: List of length-2 lists of MarkAreaDataPoint / plain named list. Each inner pair defines one band. |
silent |
Optional Logical: Whether hover / tooltip are disabled. |
precision |
Optional Integer |
item_style |
Optional ItemStyle: Default fill/border styling for all bands. Per-band overrides go on the first MarkAreaDataPoint of a pair. |
label |
Optional LabelOption: Default label configuration. |
z2 |
Optional Numeric: Front-back order among markers. |
Corresponds to MarkAreaOption in
src/component/marker/MarkAreaModel.ts (line 60).
ECharts docs:
https://echarts.apache.org/en/option.html#series-line.markArea
One endpoint of a markArea band. Two of these — wrapped in a length-2 list
— define the opposite corners of a shaded rectangle. Supplying only
x_axis on both endpoints produces a full-height vertical band (useful for
highlighting x-ranges of a time series); supplying only y_axis produces a
full-width horizontal band.
MarkAreaDataPoint( x_axis = NULL, y_axis = NULL, name = NULL, value = NULL, item_style = NULL, label = NULL )MarkAreaDataPoint( x_axis = NULL, y_axis = NULL, name = NULL, value = NULL, item_style = NULL, label = NULL )
x_axis |
Optional Numeric or Character: Position on the x-axis. |
y_axis |
Optional Numeric or Character: Position on the y-axis. |
name |
Optional Character: Label text for the band. |
value |
Optional Numeric or Character: Fallback label value when
|
item_style |
Optional ItemStyle: Fill and border styling. Styling set on the first endpoint of a pair applies to the whole band. |
label |
Optional LabelOption: Label configuration. |
Corresponds to MarkArea2DDataItemDimOption in
src/component/marker/MarkAreaModel.ts (line 49).
ECharts docs:
https://echarts.apache.org/en/option.html#series-line.markArea.data
Configuration for minor split lines (between main split lines).
MinorSplitLine(show = NULL, line_style = NULL)MinorSplitLine(show = NULL, line_style = NULL)
show |
Optional Logical: Whether to show minor split lines. |
line_style |
Optional LineStyle: Line styling. |
Corresponds to MinorSplitLineOption in src/coord/axisCommonTypes.ts (line 364).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.minorSplitLine
Configuration for minor axis tick marks (between main ticks).
MinorTick(show = NULL, split_number = NULL, length = NULL, line_style = NULL)MinorTick(show = NULL, split_number = NULL, length = NULL, line_style = NULL)
show |
Optional Logical: Whether to show minor ticks. |
split_number |
Optional Numeric |
length |
Optional Numeric |
line_style |
Optional LineStyle: Line styling. |
Corresponds to MinorTickOption in src/coord/axisCommonTypes.ts (line 346).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.minorTick
Configuration for a pie chart series.
PieSeries( name = NULL, data = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, center = NULL, radius = NULL, rose_type = NULL, clockwise = NULL, start_angle = NULL, end_angle = NULL, pad_angle = NULL, min_angle = NULL, min_show_label_angle = NULL, selected_offset = NULL, avoid_label_overlap = NULL, percent_precision = NULL, still_show_zero_sum = NULL, animation_type = NULL, item_style = NULL, label = NULL, label_line = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL )PieSeries( name = NULL, data = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, center = NULL, radius = NULL, rose_type = NULL, clockwise = NULL, start_angle = NULL, end_angle = NULL, pad_angle = NULL, min_angle = NULL, min_show_label_angle = NULL, selected_offset = NULL, avoid_label_overlap = NULL, percent_precision = NULL, still_show_zero_sum = NULL, animation_type = NULL, item_style = NULL, label = NULL, label_line = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL )
name |
Optional Character: Series name. |
data |
Optional Numeric or list: Pie data. A list of named lists with |
silent |
Optional Logical: Whether the series is silent. |
legend_hover_link |
Optional Logical: Whether to highlight related legends on hover. |
color |
Optional Character: Series color override. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same layer. |
center |
Optional Numeric or Character: Pie center as a length-2 vector. |
radius |
Optional Numeric or Character: Pie radius. |
rose_type |
Optional Character {"radius", "area"}: Nightingale chart type. |
clockwise |
Optional Logical: Whether to lay out sectors clockwise. |
start_angle |
Optional Numeric: Starting angle in degrees. |
end_angle |
Optional Numeric or Character {"auto"}: Ending angle in degrees. |
pad_angle |
Optional Numeric |
min_angle |
Optional Numeric |
min_show_label_angle |
Optional Numeric |
selected_offset |
Optional Numeric |
avoid_label_overlap |
Optional Logical: Whether to avoid label overlap automatically. |
percent_precision |
Optional Numeric |
still_show_zero_sum |
Optional Logical: Whether to show the pie when all values are zero. |
animation_type |
Optional Character {"expansion", "scale"}: First-render animation type. |
item_style |
Optional ItemStyle: Pie-sector styling. |
label |
Optional LabelOption: Data-label configuration. |
label_line |
Optional LabelLine: Label connector line configuration. |
left |
Optional Numeric or Character: Left position. |
right |
Optional Numeric or Character: Right position. |
top |
Optional Numeric or Character: Top position. |
bottom |
Optional Numeric or Character: Bottom position. |
Corresponds to PieSeriesOption in src/chart/pie/PieSeries.ts (line 105).
ECharts docs: https://echarts.apache.org/en/option.html#series-pie
Shiny render function for draw widget
renderDraw(expr, env = parent.frame(), quoted = FALSE)renderDraw(expr, env = parent.frame(), quoted = FALSE)
expr |
Expression: Expression that returns a draw widget. |
env |
Environment: Evaluation environment. |
quoted |
Logical: Whether |
rtemis Color Palette
rtemis_colorsrtemis_colors
EDG
One directed link (edge) in a Sankey diagram.
SankeyEdgeItem( source = NULL, target = NULL, value = NULL, line_style = NULL, edge_label = NULL, focus_node_adjacency = NULL )SankeyEdgeItem( source = NULL, target = NULL, value = NULL, line_style = NULL, edge_label = NULL, focus_node_adjacency = NULL )
source |
Optional Character: Source node name. |
target |
Optional Character: Target node name. |
value |
Optional Numeric: Flow value (determines link width). |
line_style |
Optional LineStyle or list: Link line styling. Accepts
a LineStyle object or a plain named list; a list also allows the
Sankey-specific |
edge_label |
Optional LabelOption: Label shown on the link itself. |
focus_node_adjacency |
Optional Logical or Character {"inEdges", "outEdges", "allEdges"}: Which adjacent elements to highlight on hover. |
Corresponds to SankeyEdgeItemOption in
src/chart/sankey/SankeySeries.ts (line 88).
ECharts docs:
https://echarts.apache.org/en/option.html#series-sankey.links
Style overrides applied to all nodes at a given column depth. depth = 0
targets the leftmost column.
SankeyLevelOption( depth = integer(0), label = NULL, item_style = NULL, line_style = NULL )SankeyLevelOption( depth = integer(0), label = NULL, item_style = NULL, line_style = NULL )
depth |
Numeric |
label |
Optional LabelOption: Node label configuration at this depth. |
item_style |
Optional ItemStyle: Node fill/border styling at this depth. |
line_style |
Optional LineStyle or list: Link styling for edges leaving
this depth. Accepts a LineStyle object or a plain list (allows |
Corresponds to SankeyLevelOption in
src/chart/sankey/SankeySeries.ts (line 96).
ECharts docs:
https://echarts.apache.org/en/option.html#series-sankey.levels
One node in a Sankey diagram. Node names must match the source / target
strings used in the corresponding SankeyEdgeItem objects.
SankeyNodeItem( name = NULL, value = NULL, depth = NULL, draggable = NULL, local_x = NULL, local_y = NULL, label = NULL, item_style = NULL, focus_node_adjacency = NULL )SankeyNodeItem( name = NULL, value = NULL, depth = NULL, draggable = NULL, local_x = NULL, local_y = NULL, label = NULL, item_style = NULL, focus_node_adjacency = NULL )
name |
Optional Character: Node name (must match source/target strings). |
value |
Optional Numeric: Node value shown in tooltip. |
depth |
Optional Numeric |
draggable |
Optional Logical: Whether the node can be dragged. |
local_x |
Optional Numeric: Horizontal position inside the layout rect. |
local_y |
Optional Numeric: Vertical position inside the layout rect. |
label |
Optional LabelOption: Node label configuration. |
item_style |
Optional ItemStyle: Node fill/border styling. |
focus_node_adjacency |
Optional Logical or Character {"inEdges", "outEdges", "allEdges"}: Which adjacent elements to highlight on hover. |
Corresponds to SankeyNodeItemOption in
src/chart/sankey/SankeySeries.ts (line 73).
ECharts docs:
https://echarts.apache.org/en/option.html#series-sankey.data
Configuration for a Sankey diagram series. Nodes and directed links are
represented as two separate lists. Node names in data must match the
source and target strings in links.
SankeySeries( name = NULL, data = NULL, links = NULL, levels = NULL, orient = NULL, node_width = NULL, node_gap = NULL, node_align = NULL, draggable = NULL, layout_iterations = NULL, sort = NULL, roam = NULL, label = NULL, edge_label = NULL, line_style = NULL, item_style = NULL, color = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, silent = NULL, z_level = NULL, z = NULL )SankeySeries( name = NULL, data = NULL, links = NULL, levels = NULL, orient = NULL, node_width = NULL, node_gap = NULL, node_align = NULL, draggable = NULL, layout_iterations = NULL, sort = NULL, roam = NULL, label = NULL, edge_label = NULL, line_style = NULL, item_style = NULL, color = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL, silent = NULL, z_level = NULL, z = NULL )
name |
Optional Character: Series name for legend and tooltip. |
data |
Optional list: Nodes as a list of SankeyNodeItem objects or
plain named lists, each with at least a |
links |
Optional list: Edges as a list of SankeyEdgeItem objects or
plain named lists with |
levels |
Optional list: List of SankeyLevelOption for per-depth styling. |
orient |
Optional Character {"horizontal", "vertical"}: Flow direction. |
node_width |
Optional Numeric |
node_gap |
Optional Numeric |
node_align |
Optional Character {"justify", "left", "right"}: Node alignment within columns. |
draggable |
Optional Logical: Whether nodes can be dragged interactively. |
layout_iterations |
Optional Numeric |
sort |
Optional Character {"desc"} or |
roam |
Optional Logical or Character {"move", "scale"}: Whether to enable pan/zoom. |
label |
Optional LabelOption: Node label configuration. |
edge_label |
Optional LabelOption: Edge label configuration. |
line_style |
Optional LineStyle or list: Default link line styling.
Accepts a LineStyle object or a plain list; a plain list also allows the
Sankey-specific |
item_style |
Optional ItemStyle: Default node styling. |
color |
Optional Character: Color palette for nodes as a character vector. |
left |
Optional Numeric or Character: Series left offset. |
right |
Optional Numeric or Character: Series right offset. |
top |
Optional Numeric or Character: Series top offset. |
bottom |
Optional Numeric or Character: Series bottom offset. |
silent |
Optional Logical: Whether to disable mouse/touch events. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same canvas layer. |
Corresponds to SankeySeriesOption in
src/chart/sankey/SankeySeries.ts (line 100).
ECharts docs: https://echarts.apache.org/en/option.html#series-sankey
Exports a widget created by draw() (or any of the draw_*
functions) to a static file. Currently supports .svg via Node.js
server-side rendering. Requires a node binary on PATH.
save_drawing(widget, filename, width = 800, height = 600)save_drawing(widget, filename, width = 800, height = 600)
widget |
htmlwidget: A widget returned by |
filename |
Character: Output file path. Extension determines the format. |
width |
Numeric: Image width in pixels. |
height |
Numeric: Image height in pixels. |
Interactive features (tooltip formatters, event handlers) are stripped before rendering — static images cannot express them.
The filename, invisibly.
Configuration for a scatter (point) chart series.
ScatterSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, clip = NULL, symbol = NULL, symbol_size = NULL, large = NULL, large_threshold = NULL, item_style = NULL, label = NULL )ScatterSeries( name = NULL, data = NULL, x_axis_index = NULL, y_axis_index = NULL, silent = NULL, legend_hover_link = NULL, color = NULL, z_level = NULL, z = NULL, clip = NULL, symbol = NULL, symbol_size = NULL, large = NULL, large_threshold = NULL, item_style = NULL, label = NULL )
name |
Optional Character: Series name for legend display. |
data |
Optional Vector or list: Data values. |
x_axis_index |
Optional Numeric |
y_axis_index |
Optional Numeric |
silent |
Optional Logical: Whether the series is silent. |
legend_hover_link |
Optional Logical: Whether to highlight related legends on hover. |
color |
Optional Character: Series color override. |
z_level |
Optional Numeric: Canvas layer index. |
z |
Optional Numeric: Front-back order within the same layer. |
clip |
Optional Logical: Whether to clip overflow. |
symbol |
Optional Character: Symbol type. |
symbol_size |
Optional Numeric or function: Symbol size. |
large |
Optional Logical: Whether to enable large-data optimization. |
large_threshold |
Optional Numeric |
item_style |
Optional ItemStyle: Data-point marker styling. |
label |
Optional LabelOption: Data-label configuration. |
Corresponds to ScatterSeriesOption in src/chart/scatter/ScatterSeries.ts (line 64).
ECharts docs: https://echarts.apache.org/en/option.html#series-scatter
Configuration for alternating colored bands between split lines.
SplitArea(show = NULL, interval = NULL, area_style = NULL)SplitArea(show = NULL, interval = NULL, area_style = NULL)
show |
Optional Logical: Whether to show the split area. |
interval |
Optional Numeric or Character {"auto"}: Split-area interval. |
area_style |
Optional AreaStyle: Area styling. |
Corresponds to SplitAreaOption in src/coord/axisCommonTypes.ts (line 369).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.splitArea
Configuration for grid split lines perpendicular to the axis.
SplitLine( show = NULL, interval = NULL, show_min_line = NULL, show_max_line = NULL, line_style = NULL )SplitLine( show = NULL, interval = NULL, show_min_line = NULL, show_max_line = NULL, line_style = NULL )
show |
Optional Logical: Whether to show split lines. |
interval |
Optional Numeric or Character {"auto"}: Split-line interval. |
show_min_line |
Optional Logical: Whether to show the split line at the minimum end. |
show_max_line |
Optional Logical: Whether to show the split line at the maximum end. |
line_style |
Optional LineStyle: Line styling. |
Corresponds to SplitLineOption in src/coord/axisCommonTypes.ts (line 353).
ECharts docs: https://echarts.apache.org/en/option.html#xAxis.splitLine
Text styling used in labels, titles, tooltips, and other text elements.
TextStyle( color = NULL, font_style = NULL, font_weight = NULL, font_family = NULL, font_size = NULL, align = NULL, vertical_align = NULL, opacity = NULL, line_height = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_type = NULL, border_dash_offset = NULL, border_radius = NULL, padding = NULL, width = NULL, height = NULL, text_border_color = NULL, text_border_width = NULL, text_border_type = NULL, text_border_dash_offset = NULL, text_shadow_blur = NULL, text_shadow_color = NULL, text_shadow_offset_x = NULL, text_shadow_offset_y = NULL, overflow = NULL, ellipsis = NULL, rich = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )TextStyle( color = NULL, font_style = NULL, font_weight = NULL, font_family = NULL, font_size = NULL, align = NULL, vertical_align = NULL, opacity = NULL, line_height = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_type = NULL, border_dash_offset = NULL, border_radius = NULL, padding = NULL, width = NULL, height = NULL, text_border_color = NULL, text_border_width = NULL, text_border_type = NULL, text_border_dash_offset = NULL, text_shadow_blur = NULL, text_shadow_color = NULL, text_shadow_offset_x = NULL, text_shadow_offset_y = NULL, overflow = NULL, ellipsis = NULL, rich = NULL, shadow_blur = NULL, shadow_color = NULL, shadow_offset_x = NULL, shadow_offset_y = NULL )
color |
Optional Character: Text color. |
font_style |
Optional Character {"normal", "italic", "oblique"}: Font style. |
font_weight |
Optional Character {"normal", "bold", "bolder", "lighter"} or Numeric |
font_family |
Optional Character: Font family name. |
font_size |
Optional Numeric or Character: Font size. |
align |
Optional Character {"left", "center", "right"}: Horizontal alignment. |
vertical_align |
Optional Character {"top", "middle", "bottom"}: Vertical alignment. |
opacity |
Optional Numeric |
line_height |
Optional Numeric |
background_color |
Optional Character: Background color behind text. |
border_color |
Optional Character: Text box border color. |
border_width |
Optional Numeric |
border_type |
Optional Character {"solid", "dashed", "dotted"}: Text box border type. |
border_dash_offset |
Optional Numeric: Text box border dash offset. |
border_radius |
Optional Numeric or Numeric vector: Text box corner radius. |
padding |
Optional Numeric or Numeric vector: Text box padding. |
width |
Optional Numeric or Character: Text box width. |
height |
Optional Numeric |
text_border_color |
Optional Character: Stroke color around the text. |
text_border_width |
Optional Numeric |
text_border_type |
Optional Character {"solid", "dashed", "dotted"}: Stroke type around the text. |
text_border_dash_offset |
Optional Numeric: Stroke dash offset around the text. |
text_shadow_blur |
Optional Numeric |
text_shadow_color |
Optional Character: Text shadow color. |
text_shadow_offset_x |
Optional Numeric: Text shadow horizontal offset. |
text_shadow_offset_y |
Optional Numeric: Text shadow vertical offset. |
overflow |
Optional Character {"truncate", "break", "breakAll", "none"}: Text overflow behavior. |
ellipsis |
Optional Character: Ellipsis string used when truncating. |
rich |
Optional Named list: Rich text styles. |
shadow_blur |
Optional Numeric |
shadow_color |
Optional Character: Box shadow color. |
shadow_offset_x |
Optional Numeric: Box shadow horizontal offset. |
shadow_offset_y |
Optional Numeric: Box shadow vertical offset. |
Corresponds to TextCommonOption in src/util/types.ts (line 1220).
ECharts docs: https://echarts.apache.org/en/option.html#title.textStyle
A chart theme that controls default colors, text styles, and
component appearance. Corresponds to the object passed as the second
argument to echarts.init(dom, theme) or registered via
echarts.registerTheme().
Theme( color = NULL, background_color = NULL, text_style = NULL, title = NULL, legend = NULL, tooltip = NULL, line = NULL, bar = NULL, pie = NULL, scatter = NULL, category_axis = NULL, value_axis = NULL, log_axis = NULL, time_axis = NULL )Theme( color = NULL, background_color = NULL, text_style = NULL, title = NULL, legend = NULL, tooltip = NULL, line = NULL, bar = NULL, pie = NULL, scatter = NULL, category_axis = NULL, value_axis = NULL, log_axis = NULL, time_axis = NULL )
color |
Optional Character: Color palette. |
background_color |
Optional Character: Chart background color. |
text_style |
Optional TextStyle: Global default text style. |
title |
Optional Named list: Title overrides. |
legend |
Optional Named list: Legend overrides. |
tooltip |
Optional Named list: Tooltip overrides. |
line |
Optional Named list: Line-series defaults. |
bar |
Optional Named list: Bar-series defaults. |
pie |
Optional Named list: Pie-series defaults. |
scatter |
Optional Named list: Scatter-series defaults. |
category_axis |
Optional Named list: Category-axis defaults. |
value_axis |
Optional Named list: Value-axis defaults. |
log_axis |
Optional Named list: Log-axis defaults. |
time_axis |
Optional Named list: Time-axis defaults. |
TS source: src/model/globalDefault.ts, src/theme/dark.ts.
Returns a dark theme. All parameters have sensible defaults; most
users only need base_font_size. Title font size defaults to 1.2x
the base; all other text defaults to 1x.
theme_dark( base_font_size = 12, title_font_size = NULL, subtitle_font_size = NULL, axis_label_font_size = NULL, legend_font_size = NULL, tooltip_font_size = NULL, font_family = "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", color = rtemis_colors, bg_color = "#181818", fg_color = "rgba(255, 255, 255, 0.7)", title_color = "rgba(255, 255, 255, 0.9)", subtitle_color = "rgba(255, 255, 255, 0.5)", legend_color = NULL, axis_color = "rgba(255, 255, 255, 0.3)", grid_color = "rgba(255, 255, 255, 0.1)", tooltip_bg = "rgba(20, 20, 20, 0.9)", tooltip_border_color = "rgba(255, 255, 255, 0.1)", tooltip_color = NULL )theme_dark( base_font_size = 12, title_font_size = NULL, subtitle_font_size = NULL, axis_label_font_size = NULL, legend_font_size = NULL, tooltip_font_size = NULL, font_family = "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", color = rtemis_colors, bg_color = "#181818", fg_color = "rgba(255, 255, 255, 0.7)", title_color = "rgba(255, 255, 255, 0.9)", subtitle_color = "rgba(255, 255, 255, 0.5)", legend_color = NULL, axis_color = "rgba(255, 255, 255, 0.3)", grid_color = "rgba(255, 255, 255, 0.1)", tooltip_bg = "rgba(20, 20, 20, 0.9)", tooltip_border_color = "rgba(255, 255, 255, 0.1)", tooltip_color = NULL )
base_font_size |
Numeric |
title_font_size |
Optional Numeric |
subtitle_font_size |
Optional Numeric |
axis_label_font_size |
Optional Numeric |
legend_font_size |
Optional Numeric |
tooltip_font_size |
Optional Numeric |
font_family |
Character: Font family string. |
color |
Character: Color palette. |
bg_color |
Optional Character: Chart background color. |
fg_color |
Optional Character: Global text color. |
title_color |
Optional Character: Title text color. |
subtitle_color |
Optional Character: Subtitle text color. |
legend_color |
Optional Character: Legend text color. |
axis_color |
Optional Character: Axis line color. |
grid_color |
Optional Character: Grid or split-line color. |
tooltip_bg |
Optional Character: Tooltip background color. |
tooltip_border_color |
Optional Character: Tooltip border color. |
tooltip_color |
Optional Character: Tooltip text color. |
Theme: Theme object.
Returns a light theme. All parameters have sensible defaults; most
users only need base_font_size. Title font size defaults to 1.2x
the base; all other text defaults to 1x.
theme_light( base_font_size = 12, title_font_size = NULL, subtitle_font_size = NULL, axis_label_font_size = NULL, legend_font_size = NULL, tooltip_font_size = NULL, font_family = "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", color = rtemis_colors, bg_color = "#ffffff", fg_color = "rgba(0, 0, 0, 0.7)", title_color = NULL, subtitle_color = NULL, legend_color = NULL, axis_color = NULL, grid_color = NULL, tooltip_bg = NULL, tooltip_border_color = NULL, tooltip_color = NULL )theme_light( base_font_size = 12, title_font_size = NULL, subtitle_font_size = NULL, axis_label_font_size = NULL, legend_font_size = NULL, tooltip_font_size = NULL, font_family = "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", color = rtemis_colors, bg_color = "#ffffff", fg_color = "rgba(0, 0, 0, 0.7)", title_color = NULL, subtitle_color = NULL, legend_color = NULL, axis_color = NULL, grid_color = NULL, tooltip_bg = NULL, tooltip_border_color = NULL, tooltip_color = NULL )
base_font_size |
Numeric |
title_font_size |
Optional Numeric |
subtitle_font_size |
Optional Numeric |
axis_label_font_size |
Optional Numeric |
legend_font_size |
Optional Numeric |
tooltip_font_size |
Optional Numeric |
font_family |
Character: Font family string. |
color |
Character: Color palette. |
bg_color |
Optional Character: Chart background color. |
fg_color |
Optional Character: Global text color. |
title_color |
Optional Character: Title text color. |
subtitle_color |
Optional Character: Subtitle text color. |
legend_color |
Optional Character: Legend text color. |
axis_color |
Optional Character: Axis line color. |
grid_color |
Optional Character: Grid or split-line color. |
tooltip_bg |
Optional Character: Tooltip background color. |
tooltip_border_color |
Optional Character: Tooltip border color. |
tooltip_color |
Optional Character: Tooltip text color. |
Theme: Theme object.
Chart title configuration with main text and optional subtext.
Title( show = NULL, text = NULL, link = NULL, target = NULL, subtext = NULL, sublink = NULL, subtarget = NULL, text_align = NULL, text_vertical_align = NULL, padding = NULL, item_gap = NULL, text_style = NULL, subtext_style = NULL, trigger_event = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_radius = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL )Title( show = NULL, text = NULL, link = NULL, target = NULL, subtext = NULL, sublink = NULL, subtarget = NULL, text_align = NULL, text_vertical_align = NULL, padding = NULL, item_gap = NULL, text_style = NULL, subtext_style = NULL, trigger_event = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_radius = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL )
show |
Optional Logical: Whether to show the title. |
text |
Optional Character: Main title text. Supports |
link |
Optional Character: Hyperlink for the main title. |
target |
Optional Character {"self", "blank"}: Link target. |
subtext |
Optional Character: Subtitle text. |
sublink |
Optional Character: Hyperlink for the subtitle. |
subtarget |
Optional Character {"self", "blank"}: Subtitle link target. |
text_align |
Optional Character {"auto", "left", "center", "right"}: Horizontal alignment. |
text_vertical_align |
Optional Character {"auto", "top", "middle", "bottom"}: Vertical alignment. |
padding |
Optional Numeric: Padding inside the title box. |
item_gap |
Optional Numeric |
text_style |
Optional TextStyle: Main title text style. |
subtext_style |
Optional TextStyle: Subtitle text style. |
trigger_event |
Optional Logical: Whether the title emits events. |
background_color |
Optional Character: Title-box background color. |
border_color |
Optional Character: Border color. |
border_width |
Optional Numeric |
border_radius |
Optional Numeric: Border radius. |
left |
Optional Numeric or Character: Left position. |
right |
Optional Numeric or Character: Right position. |
top |
Optional Numeric or Character: Top position. |
bottom |
Optional Numeric or Character: Bottom position. |
Corresponds to TitleOption in src/component/title/install.ts (line 48).
ECharts docs: https://echarts.apache.org/en/option.html#title
Convert EChartsOption to JSON
to_json(x, pretty = FALSE, auto_unbox = TRUE, ...)to_json(x, pretty = FALSE, auto_unbox = TRUE, ...)
x |
EChartsOption: Option object to serialize. |
pretty |
Logical: Whether to pretty-print the JSON. |
auto_unbox |
Logical: Whether to auto-unbox single-element vectors. |
... |
Dots: Additional arguments passed to |
Character: JSON string.
Generic function that converts an S7 object to a plain named list matching the ECharts JSON option structure.
to_list(x, ...)to_list(x, ...)
x |
S7 object: Object to serialize. |
... |
Dots: Unused. |
List: Named list.
Tooltip configuration for showing data on hover/click.
Tooltip( show = NULL, trigger = NULL, trigger_on = NULL, show_content = NULL, always_show_content = NULL, formatter = NULL, value_formatter = NULL, position = NULL, confine = NULL, enterable = NULL, show_delay = NULL, hide_delay = NULL, transition_duration = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_radius = NULL, padding = NULL, text_style = NULL, extra_css_text = NULL, order = NULL, class_name = NULL )Tooltip( show = NULL, trigger = NULL, trigger_on = NULL, show_content = NULL, always_show_content = NULL, formatter = NULL, value_formatter = NULL, position = NULL, confine = NULL, enterable = NULL, show_delay = NULL, hide_delay = NULL, transition_duration = NULL, background_color = NULL, border_color = NULL, border_width = NULL, border_radius = NULL, padding = NULL, text_style = NULL, extra_css_text = NULL, order = NULL, class_name = NULL )
show |
Optional Logical: Whether to show the tooltip. |
trigger |
Optional Character {"item", "axis", "none"}: Trigger type. |
trigger_on |
Optional Character {"mousemove", "click", "none", "mousemove|click"}: Trigger event.
|
show_content |
Optional Logical: Whether to show tooltip content. |
always_show_content |
Optional Logical: Whether to keep the tooltip visible. |
formatter |
Optional Character or function: Tooltip content formatter. |
value_formatter |
Optional function: Formatter for the value portion. |
position |
Optional Character or Numeric: Tooltip position. |
confine |
Optional Logical: Whether to confine the tooltip within the chart container. |
enterable |
Optional Logical: Whether the mouse can enter the tooltip. |
show_delay |
Optional Numeric |
hide_delay |
Optional Numeric |
transition_duration |
Optional Numeric |
background_color |
Optional Character: Background color. |
border_color |
Optional Character: Border color. |
border_width |
Optional Numeric |
border_radius |
Optional Numeric |
padding |
Optional Numeric: Padding inside the tooltip. |
text_style |
Optional TextStyle: Tooltip text style. |
extra_css_text |
Optional Character: Extra CSS for HTML render mode. |
order |
Optional Character {"seriesAsc", "seriesDesc", "valueAsc", "valueDesc"}: Tooltip content order. |
class_name |
Optional Character: CSS class name for the tooltip element. |
Corresponds to TooltipOption in src/component/tooltip/TooltipModel.ts (line 36)
and CommonTooltipOption in src/util/types.ts (line 1527).
ECharts docs: https://echarts.apache.org/en/option.html#tooltip
Continuous visual map component that maps data values to visual properties (typically color). Required for heatmaps.
VisualMap( type = "continuous", min = NULL, max = NULL, precision = NULL, calculable = NULL, show = NULL, orient = NULL, in_range = NULL, out_of_range = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL )VisualMap( type = "continuous", min = NULL, max = NULL, precision = NULL, calculable = NULL, show = NULL, orient = NULL, in_range = NULL, out_of_range = NULL, left = NULL, right = NULL, top = NULL, bottom = NULL )
type |
Character {"continuous", "piecewise"}: Visual map type. |
min |
Optional Numeric: Minimum value of the mapped data range. |
max |
Optional Numeric: Maximum value of the mapped data range. |
precision |
Optional Integer |
calculable |
Optional Logical: Whether to show drag handles for interactive range selection. |
show |
Optional Logical: Whether to display the visual map legend. |
orient |
Optional Character {"vertical", "horizontal"}: Orientation of the color bar. |
in_range |
Optional list: Visual encoding for in-range values.
Typically |
out_of_range |
Optional list: Visual encoding for out-of-range values. |
left |
Optional Numeric or Character: Distance from the left of the container. |
right |
Optional Numeric or Character: Distance from the right of the container. |
top |
Optional Numeric or Character: Distance from the top of the container. |
bottom |
Optional Numeric or Character: Distance from the bottom of the container. |
Corresponds to ContinuousVisualMapOption in
src/component/visualMap/ContinuousModel.ts.
ECharts docs: https://echarts.apache.org/en/option.html#visualMap-continuous