Function to produce catmaply traces.
add_catmaply_slider(
fig,
df,
annotated,
text_color = "#444",
text_size = 12,
text_font_family = c("Open Sans", "verdana", "arial", "sans-serif"),
slider_steps,
slider_currentvalue_prefix = "",
slider_step_visible,
slider_currentvalue_visible,
slider_tick_visible,
hover_hide,
color_palette,
categorical_color_range,
category_items,
legend_items,
legend
)
plot_ly object
plotly object
data.frame or tibble holding the data.
boolean indicating if annotations should be displayed.
font color to be used for text; (default: "#444").
font size to be used for text/annotation. Needs to be a number greater than or equal to 1; (default: 12). The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system; (default: c("Open Sans", "verdana", "arial", "sans-serif")).
list holding the configuration of the steps to be created. There are two alternatives: auto
and
custom
; whereas the auto
mode creates the steps automatically and custom
takes custom instructions on how to create the steps.
For mode auto
, a list
with the following elements has to be submitted (values of the list element are just examples):
list(
slider_start=1,
slider_range=15,
slider_shift=5,
)
This will create the steps automatically for you, essentially starting at position slider_start
,
shifting the window of size slider_range
along the x axis with a stepsize of slider_shift
. The stepnames
are automatically selected with the x value of the left side of the slider_range (so for 1 it would take the first value of the x axis as name of the step).
With custom, on the other hand, you can define the step configuration without any restrictions. The custom
configuration needs to be defined in a list
with the following elements.
list(
list(name="Step_One", range=c(1, 50)),
list(name="Step_Two", range=c(5, 55)),
...
).
(default:
list(
slider_start=1,
slider_range=15,
slider_shift=5,
)).
prefix to be used for the slider title. Only used if slider=TRUE
. (default: "").
boolean indicating if the step names should be displayed for the slider. (default: TRUE).
boolean indicating if the currently selected value should be displayed above the slider. (default: TRUE).
boolean indicating if the tickvalues should be displayed below the slider. (default: TRUE).
boolean indicating if the hover label should be hidden or not; (default: FALSE).
a color palette vector.
if the resulting heatmap holds categorical field values or continuous values that belong to a category; (default: FALSE).
distinct/unique items of ordered category items
distinct/unique items of ordered legend items