Last data update: 2014.03.03
|
R: Functions to interact with a Sparkline object
getParameter | R Documentation |
Functions to interact with a Sparkline object
Description
Basic functions to query parameters for objects of class 'sparkline', 'sparkbar',
'sparkbox', 'sparkTable' or 'geoTable'.
Usage
getParameter(object, type)
Arguments
object |
objects of class 'sparkline', 'sparkbar', 'sparkbox', 'sparkTable' or 'geoTable'
|
type |
one of the following:
'width': query slot 'width' for objects of class 'spark' and classes that directly extend this class.
'height': query slot 'height' for objects of class 'spark' and classes that directly extend this class.
'values': query slot 'values' for objects of class 'spark' and classes that directly extend this class.
'padding': query slot 'padding' for objects of class 'spark' and classes that directly extend this class.
'allColors': query slot 'allColors' for objects of class 'sparkline'.
'lineWidth': query slot 'lineWidth' for objects of class 'sparkline'.
'pointWidth': query slot 'pointWidth' for objects of class 'sparkline'.
'showIQR': query slot 'showIQR' for objects of class 'sparkline'.
'boxCol': query slot 'boxCol' for objects of class 'sparkbox'.
'outCol': query slot 'outCol' for objects of class 'sparkbox'.
'boxLineWidth': query slot 'boxLineWidth' for objects of class 'sparkbox'.
'barCol': query slot 'barCol' for objects of class 'sparkbar'.
'barSpacingPerc': query slot 'barSpacingPerc' for objects of class 'sparkbar'.
'dataObj': query slot 'dataObj' for objects of class 'sparkTable'.
'tableContent': query slot 'tableContent' for objects of class 'sparkTable'.
'varType': query slot 'varType' for objects of class 'sparkTable'.
'geographicVar': query slot 'geographicVar' for objects of class 'geoTable'.
'geographicInfo': query slot 'geographicInfo' for objects of class 'geoTable'.
'geographicOrder': query slot 'geographicOrder' for objects of class 'geoTable'.
|
Author(s)
Bernhard Meindl, Alexander Kowarik, Statistics Austria
See Also
setParameter
Examples
data(pop)
x <- pop[pop[,2]=="Insgesamt",3]
a <- newSparkLine(values=x, pointWidth=8)
a <- setParameter(a, type='values', value=sample(1:10, 15, replace=TRUE))
getParameter(a, 'values')
a <- setParameter(a, type='allColors',
value=c("darkred", "darkgreen","darkblue", "white", "black", "red"))
getParameter(a, 'allColors')
getParameter(a, 'pointWidth')
a <- setParameter(a, type='pointWidth', value=3)
getParameter(a, 'pointWidth')
a <- setParameter(a, type='lineWidth', value=1)
a <- setParameter(a, type='width', value=6)
a <- setParameter(a, type='height', value=.6)
Results
|