chart_viz_options | R Documentation |
This page describes the chart options arguments
The tableOpts
options are used to style tables from the reactable
package
and their descriptions have been copied and slightly adapted from their Github
documentation.
dsviz_default_opts(...)
title |
String with the main title (on top). Default is NULL |
subtitle |
String for subtitle (below the title). Default is NULL |
caption |
String for caption (bottom). Default is NULL |
hor_title |
String with horizontal axis title. Default is NULL |
ver_title |
String with vertical axis title . Default is NULLL |
legend_title |
String with the main title to legend. Default is NULL |
palette_colors |
An optional character vector specifying the colors |
palette_type |
String with type of color palette (optional). Options:
"categorical", "sequential" and "divergent" palettes, more info in < |
color_by |
A character with the name of the variable by which you want to color the graph. Default is NULL |
drop_na |
Boolean. If TRUE drop missing values |
na_label |
String with label that should be used to recode missing values. Default is "(NA)" |
drop_na_legend |
Boolean. If TRUE drop missing values in legend |
agg |
Aggregation type to compute summary statistics of data. Options: "sum", "mean", "median". Default is "sum" |
agg_text |
When there is aggregation agg_text is prepended to grouped variable |
sort |
String. Order the bars by the values of the graphed category. Options: "without", "desc" (sort a variable in descending order), "asc" (sort a variable in ascending order). Default is "without. |
slice_n |
Numeric value, It allows you to select and remove unique rows |
order |
A character vector of variables to sort categories on the axes in the respective order. |
order_legend |
A character vector of variables to sort categories on the legend in the respective order. |
percentage |
Boolean. If TRUE, calculates the percentage according to the variable chosen in "percetage_col", by default it chooses the first column of the entered dataframe. |
percentage_col |
A character with the name of the variable for which you want the percentage to be calculated. |
format_sample_cat |
A specifier to format categories, e.g. "TITTLE", "lowercase", "Title Case" |
format_sample_num |
A specifier to format numerical value(s), e.g. "1,234.56" or "1'234.5678" |
format_sample_dat |
A specifier to format date(s), e.g. "28/04/2020" or "February 28th 2020" |
datalabel_formmater_js |
A specifier to format numerical value(s) - catcatnum - treemap, e.g.12K, 12M |
locale |
Locale to use, e.g. "fr-FR" for french. |
label_wrap |
Is this a numeric vector of length one or just an integer to choose the number of characters of the label text (overflowing text will be placed in a new line below). |
label_wrap_legendIs |
this a numeric vector of length one or just an integer to choose the number of characters in each line of text in the legend (overflowing text will be placed in a new line below.) |
spline |
Boolean. If TRUE, the segments between the data points are smoothed. |
suffix |
Character string to append before formatted value. |
prefix |
Character string to append after formatted value. |
orientation |
A character vector of length one, where the chart can be displayed vertically ("ver") or horizontally ("hor"). |
graph_type |
A character vector of length one with graph type. Options: "grouped" (show individual values) or "stacked" (stack the values of each series on top of each other). Default is "grouped". |
highlight_value |
A character vector with the categories you want to highlight. Default is NULL |
highlight_value_color |
A character vector of length one with the color to highlight categories select in highlight_value |
tooltip |
HTML with information that appears when hovering your pointer over the graph. Variables are enclosed by curly brackets. |
groupBy |
Character vector of column names to group by. |
sortable |
Enable sorting? Default is TRUE. |
resizable |
Enable column resizing? Default is FALSE. |
filterable |
Enable column filtering? Default is FALSE. |
searchable |
Enable global table searching? Default is FALSE. |
selection |
Enable row selection? Either "multiple" or "single" for multiple or single row selection. Default is NULL. |
showSortIcon |
Show a sort icon when sorting columns? Default is TRUE. |
showSortable |
Show an indicator on sortable columns? Default is TRUE. |
height |
Height of the table in pixels. Default is "auto" for automatic sizing. |
width |
Width of the table in pixels. Default is "auto" for automatic sizing. |
fullWidth |
Stretch the table to fill the full width of its container? Default is TRUE. |
wrap |
Enable text wrapping? Default is TRUE. |
outlined |
Add borders around the table? Default is FALSE. |
bordered |
Add borders around the table and every cell? Default is FALSE. |
borderless |
Remove inner borders from table? Default is TRUE. |
striped |
Add zebra-striping to table rows? Default is TRUE. |
compact |
Make tables more compact? Default is FALSE. |
highlight |
Highlight table rows on hover? Default is FALSE. |
pagination |
Enable pagination? Default is TRUE. |
showPagination |
Show pagination? Default is NULL (defaults to TRUE if the table has more than one page). |
showPageInfo |
Show page info? Default is TRUE. |
showPageSizeOptions |
Show page size options? Default is FALSE. |
paginationType |
Pagination control to use. Either "numbers" for page number buttons (the default), "jump" for a page jump, or "simple" to show 'Previous' and 'Next' buttons only. |
defaultPageSize |
Default page size for the table. Default is 10. |
pageSizeOptions |
Page size options for the table. Default is 10, 25, 50, 100. |
linksAsHyperlinks |
Cells that start with http, https or www will be converted to hyperlinks. Default is TRUE. |
allow_point |
Boolean. If TRUE, allow this series' points to be selected by clicking on the graphic. Default is FALSE. |
color_click |
String with color to change the color of the series that was clicked. |
color_hover |
String with color to change the color of the series over which the mouse hovered. |
cursor |
You can set the cursor to "pointer" if you have click events attached to the series, to signal to the user that the points and lines can be clicked. |
clickFunction |
String with JS function to indicate the values to be captured when clicking on the chart. |
dataLabels_show |
Boolean. If TRUE it shows the values of the chart labels |
dataLabels_format_sample |
String. A specifier to format label(s) |
dataLabels_size |
Number. Label font size |
dataLabels_color |
String with hexadecimal color for the label |
dataLabels_text_outline |
Boolean. If TRUE, data labels are show with outline |
legend_decreasing |
Leaflet legend, If True decreasing order |
opts |
All of the previous options can be passed as list of options opts |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.