TealSlicesBlock | R Documentation |
TealSlicesBlock
Specialized TealSlicesBlock
block for managing filter panel content in reports.
teal.reporter::ContentBlock
-> teal.reporter::TextBlock
-> TealSlicesBlock
new()
Returns a TealSlicesBlock
object.
TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
content
(teal_slices
) object returned from teal_slices()
function.
style
(character(1)
) string specifying style to apply.
Returns a TealSlicesBlock
object with no content and no parameters.
Object of class TealSlicesBlock
, invisibly.
set_content()
Sets content of this TealSlicesBlock
.
Sets content as YAML
text which represents a list generated from teal_slices
.
The list displays limited number of fields from teal_slice
objects, but this list is
sufficient to conclude which filters were applied.
When selected
field in teal_slice
object is a range, then it is displayed as a "min"
TealSlicesBlock$set_content(content)
content
(teal_slices
) object returned from teal_slices()
function.
self
, invisibly.
from_list()
Create the TealSlicesBlock
from a list.
TealSlicesBlock$from_list(x)
x
(named list
) with two fields text
and style
.
Use the get_available_styles
method to get all possible styles.
self
, invisibly.
TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal") block <- TealSlicesBlock$new() block$from_list(list(text = "sth", style = "default"))
to_list()
Convert the TealSlicesBlock
to a list.
TealSlicesBlock$to_list()
named list
with a text and style.
TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal") block <- TealSlicesBlock$new() block$to_list()
clone()
The objects of this class are cloneable with this method.
TealSlicesBlock$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `TealSlicesBlock$from_list`
## ------------------------------------------------
TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal")
block <- TealSlicesBlock$new()
block$from_list(list(text = "sth", style = "default"))
## ------------------------------------------------
## Method `TealSlicesBlock$to_list`
## ------------------------------------------------
TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal")
block <- TealSlicesBlock$new()
block$to_list()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.