General chart options
Usage
ChartOpts(
max_digits = getOption("taxplore.max_digits", 7),
hue_range = getOption("taxplore.hue_range", c(0, 120)),
unknown_label = getOption("taxplore.unknown_label"),
root_label = getOption("taxplore.root_label", "Root"),
total_label = getOption("taxplore.total_label", "Total"),
method = getOption("taxplore.method"),
resources_url = getOption("taxplore.resources_url"),
interactive = getOption("taxplore.interactive"),
minify = getOption("taxplore.minify"),
kronatools_dir = getOption("taxplore.kronatools_dir")
)Arguments
- max_digits
Maximum number of significant digits to print for decimal numbers. Reducing to <7 digits (the default) may help in obtaining smaller HTML files.
- total_label
Label for the total abundance displayed on the top right of the chart.
- method
HTML generation method ('internal' or 'kronatools'), ' passed to generate_krona_html
- minify
If
TRUE, a minified version of the Krona JavaScript is included Automatically activated in plot_krona when embedded This option is ignored ifmethod = 'kronatools'and has no effect ifresources_urlis provided.- hue_range:
Hue at the start and end points of the fill gradient if coloring by a user-specified gradient (see
colorandcolor_value_rangearguments inmake_krona).- unknown_label:
Label to set instead of
NAs in the classification/taxonomy (if any present). By default,NAs are left in place, resulting in fewer child nodes. Krona charts handle this situation well (see e.g. https://krona.sourceforge.net/examples/xml.krona.html).- root_label:
Label to use for the root of the taxonomic tree. It is only displayed if the uppermost level in the hierarchy has more than one category, or
collapseis disabled (see ChartDisplayOpts).- resources_url:
Optional URL pointing to remote Javascript and image resources, which will then be linked to instead of embedded into the chart. The resulting charts are not be standalone and require an internet connection for displaying, but the HTML file size is smaller. Example:
resources_url = 'http://marbl.github.io/Krona/'The given URL address should serve the contents of the 'src' and 'img' directories from KronaTools (https://github.com/marbl/Krona/tree/master/KronaTools) (see copy_krona_resources).- kronatools_dir:
Optional path pointing to a 'KronaTools' directory extracted from the Krona source code archive, downloaded from here. This option is ignored if
method = 'internal'.- snapshot
If
TRUE, the Krona chart is immediately turned into a non-interactive snapshot. In contrast to theinteractiveparameter ofplot_krona, this option permanently modifies the chart HTML code, so files exported withoutfile = ...will also be non-interactive.
Details
There are different ways to apply these options:
Supply options directly to make_krona or plot_krona:
plot_krona(..., root_label = 'Records')Supply as
optsto make_krona or plot_krona:make_krona(..., opts = ChartOpts(...))Set global defaults before the call(s) to
make_krona():set_chart_opts(...)Set with options as follows:
options(taxplore.optionname, value)