
vl_config_scale
vl_config_scale.RdAdd scale config (ScaleConfig) to a vega-lite spec.
Usage
vl_config_scale(
spec,
bandPaddingInner = NULL,
bandPaddingOuter = NULL,
bandWithNestedOffsetPaddingInner = NULL,
bandWithNestedOffsetPaddingOuter = NULL,
barBandPaddingInner = NULL,
clamp = NULL,
continuousPadding = NULL,
maxBandSize = NULL,
maxFontSize = NULL,
maxOpacity = NULL,
maxSize = NULL,
maxStrokeWidth = NULL,
minBandSize = NULL,
minFontSize = NULL,
minOpacity = NULL,
minSize = NULL,
minStrokeWidth = NULL,
offsetBandPaddingInner = NULL,
offsetBandPaddingOuter = NULL,
pointPadding = NULL,
quantileCount = NULL,
quantizeCount = NULL,
rectBandPaddingInner = NULL,
round = NULL,
useUnaggregatedDomain = NULL,
xReverse = NULL,
.object = NULL
)Arguments
- spec
An input vega-lite spec
- bandPaddingInner
Default inner padding for
xandyband scales.Default value:
nestedOffsetPaddingInnerfor x/y scales with nested x/y offset scales.barBandPaddingInnerfor bar marks (0.1by default)rectBandPaddingInnerfor rect and other marks (0by default)
- bandPaddingOuter
Default outer padding for
xandyband scales.Default value:
paddingInner/2(which makes width/height = number of unique values * step)- bandWithNestedOffsetPaddingInner
Default inner padding for
xandyband scales with nestedxOffsetandyOffsetencoding.Default value:
0.2- bandWithNestedOffsetPaddingOuter
Default outer padding for
xandyband scales with nestedxOffsetandyOffsetencoding.Default value:
0.2- barBandPaddingInner
Default inner padding for
xandyband-ordinal scales of"bar"marks.Default value:
0.1- clamp
If true, values that exceed the data domain are clamped to either the minimum or maximum range value
- continuousPadding
Default padding for continuous x/y scales.
Default: The bar width for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.;
0otherwise.- maxBandSize
The default max value for mapping quantitative fields to bar's size/bandSize.
If undefined (default), we will use the axis's size (width or height) - 1.
- maxFontSize
The default max value for mapping quantitative fields to text's size/fontSize.
Default value:
40- maxOpacity
Default max opacity for mapping a field to opacity.
Default value:
0.8- maxSize
Default max value for point size scale.
- maxStrokeWidth
Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.
Default value:
4- minBandSize
The default min value for mapping quantitative fields to bar and tick's size/bandSize scale with zero=false.
Default value:
2- minFontSize
The default min value for mapping quantitative fields to tick's size/fontSize scale with zero=false
Default value:
8- minOpacity
Default minimum opacity for mapping a field to opacity.
Default value:
0.3- minSize
Default minimum value for point size scale with zero=false.
Default value:
9- minStrokeWidth
Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks with zero=false.
Default value:
1- offsetBandPaddingInner
Default padding inner for xOffset/yOffset's band scales.
Default Value:
0- offsetBandPaddingOuter
Default padding outer for xOffset/yOffset's band scales.
Default Value:
0- pointPadding
Default outer padding for
xandypoint-ordinal scales.Default value:
0.5(which makes width/height = number of unique values * step)- quantileCount
Default range cardinality for
quantilescale.Default value:
4- quantizeCount
Default range cardinality for
quantizescale.Default value:
4- rectBandPaddingInner
Default inner padding for
xandyband-ordinal scales of"rect"marks.Default value:
0- round
If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for
x,y, andsizescales.)- useUnaggregatedDomain
Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.
This is equivalent to setting
domainto"unaggregate"for aggregated quantitative fields by default.This property only works with aggregate functions that produce values within the raw data domain (
"mean","average","median","q1","q3","min","max"). For other aggregations that produce values outside of the raw data domain (e.g."count","sum"), this property is ignored.Default value:
false- xReverse
Reverse x-scale by default (useful for right-to-left charts).
- .object
Directly input an object, rather than creating one via the other arguments. Should not be used in conjunction with the other arguments other than
spec. Objects can be of type: ScaleConfig