| 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.
nameThe name of the style (for a named style).
declarationsA list containing the style declarations.
new()Create a new 'PivotStyle' object.
PivotStyle$new(parentPivot, styleName = NULL, declarations = NULL)
parentPivotThe pivot table that this 'PivotStyle' instance belongs to.
styleNameThe name of the style (for a named style).
declarationsCSS 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)
propertyThe name of the style property to set, e.g. "font-weight".
valueThe value of the style property to set, e.g. "bold".
No return value.
setPropertyValues()Set multiple style properties.
PivotStyle$setPropertyValues(declarations = NULL)
declarationsCSS 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)
propertyThe 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)
selectorA 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)
styleNamePrefixA 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)
newStyleNameThe 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)
deepWhether 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.