PivotStyle | R Documentation |
The 'PivotStyle' class specifies the styling for headers and cells in a pivot table. Styles are specified in the form of Cascading Style Sheet (CSS) name-value pairs.
R6Class
object.
name
The name of the style (for a named style).
declarations
A list containing the style declarations.
new()
Create a new 'PivotStyle' object.
PivotStyle$new(parentPivot, styleName = NULL, declarations = NULL)
parentPivot
The pivot table that this 'PivotStyle' instance belongs to.
styleName
The name of the style (for a named style).
declarations
CSS style declarations in the form of a list, e.g. 'list("font-weight"="bold", "color"="#0000FF")'
A new 'PivotStyle' object.
setPropertyValue()
Set a single style property.
PivotStyle$setPropertyValue(property = NULL, value = NULL)
property
The name of the style property to set, e.g. "font-weight".
value
The value of the style property to set, e.g. "bold".
No return value.
setPropertyValues()
Set multiple style properties.
PivotStyle$setPropertyValues(declarations = NULL)
declarations
CSS style declarations in the form of a list, e.g. 'list("font-weight"="bold", "color"="#0000FF")'
No return value.
getPropertyValue()
Get the value of a single style property.
PivotStyle$getPropertyValue(property = NULL)
property
The name of the style property to set, e.g. "font-weight".
The value of the style property.
asCSSRule()
Get the style definition in the form of a CSS rule.
PivotStyle$asCSSRule(selector = NULL)
selector
A CSS selector, used to select the element(s) to be styled.
The style declarations in the form of a CSS rule, i.e. selector property-name1: property-value1, property-name2: property-value2, ... e.g. div font-weight: bold, color: #0000FF
asNamedCSSStyle()
Get the style definition in the form of a named CSS style.
PivotStyle$asNamedCSSStyle(styleNamePrefix = NULL)
styleNamePrefix
A prefix to prepend to the style name.
The style declarations in the form of named CSS style, i.e. .prefix-stylename property-name1: property-value1, property-name2: property-value2, ... e.g. .pvt1Cell font-weight: bold, color: #0000FF
getCopy()
Create a copy of this 'PivotStyle' object.
PivotStyle$getCopy(newStyleName = NULL)
newStyleName
The name of the new style.
A 'PivotStyle' object.
asList()
Return the contents of this object as a list for debugging.
PivotStyle$asList()
A list of various object properties.
asJSON()
Return the contents of this object as JSON for debugging.
PivotStyle$asJSON()
A JSON representation of various object properties.
clone()
The objects of this class are cloneable with this method.
PivotStyle$clone(deep = FALSE)
deep
Whether to make a deep clone.
# This class should only be created by the pivot table.
# It is not intended to be created outside of the pivot table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.