addListener | R Documentation |
Methods for inherited classes.
addListener(.Object, name, expression) ## S4 method for signature 'AmObject,character,character' addListener(.Object, name, expression) resetProperties(.Object, ...) ## S4 method for signature 'AmObject' resetProperties(.Object, ...) setProperties(.Object, list_prop, ...) ## S4 method for signature 'AmObject' setProperties(.Object, list_prop, ...)
.Object |
|
name |
|
expression |
|
... |
other properties |
list_prop |
(Optional) |
Former properties will be overwritten.
Former properties will be overwritten.
The updated object.
## Not run: addListener(.Object = amPieChart(), name = "clickSlice" , expression = "function(event){ alert('ok !'); }") addListener(.Object = amLegend(), name = "select", expression = paste0("function onSelect (properties) {", "alert('selected nodes: ' + properties.nodes);", "}")) ## End(Not run) ## Not run: library(pipeR) amPlot(runif(10)) %>>% resetProperties("categoryAxis") %>>% print(withDetail = FALSE) ## End(Not run) ## Not run: library(pipeR) # either you can set a list ls <- list(categoryAxis = list(gridPosition = "start"), fontSize = 15) amSerialChart() %>>% setProperties(list = ls) %>>% print() # or you can set one or more properties amPieChart() %>>% setProperties(handDrawn = TRUE, fontSize = 15) %>>% print() # overwrite a property amPieChart() %>>% setProperties(fontSize = 15) %>>% setProperties(fontSize = 12) %>>% print() # Carefull if you try to set a property which is a slot... # in that case, use the setter methods 'setXX' or 'addXX' which check the validity amPieChart() %>>% setProperties(type = "serial") %>>% print() amPieChart() %>>% setExport() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.