altair.ViewConfig#
- class altair.ViewConfig(clip=Undefined, continuousHeight=Undefined, continuousWidth=Undefined, cornerRadius=Undefined, cursor=Undefined, discreteHeight=Undefined, discreteWidth=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, step=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, **kwds)#
ViewConfig schema wrapper
Mapping(required=[])
- Parameters:
- clipboolean
Whether the view should be clipped.
- continuousHeightfloat
The default height when the plot has a continuous y-field for x or latitude, or has arc marks.
Default value:
200
- continuousWidthfloat
The default width when the plot has a continuous field for x or longitude, or has arc marks.
Default value:
200
- cornerRadiusanyOf(float,
ExprRef
) The radius in pixels of rounded rectangles or arcs’ corners.
Default value:
0
- cursor
Cursor
The mouse cursor used over the view. Any valid CSS cursor type can be used.
- discreteHeightanyOf(float, Mapping(required=[step]))
The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of
{step: number}
defining the height per discrete step.Default value: a step size based on
config.view.step
.- discreteWidthanyOf(float, Mapping(required=[step]))
The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of
{step: number}
defining the width per discrete step.Default value: a step size based on
config.view.step
.- fillanyOf(
Color
, None,ExprRef
) The fill color.
Default value:
undefined
- fillOpacityanyOf(float,
ExprRef
) The fill opacity (value between [0,1]).
Default value:
1
- opacityanyOf(float,
ExprRef
) The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- stepfloat
Default step size for x-/y- discrete fields.
- strokeanyOf(
Color
, None,ExprRef
) The stroke color.
Default value:
"#ddd"
- strokeCapanyOf(
StrokeCap
,ExprRef
) The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashanyOf(List(float),
ExprRef
) An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetanyOf(float,
ExprRef
) The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinanyOf(
StrokeJoin
,ExprRef
) The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitanyOf(float,
ExprRef
) The miter limit at which to bevel a line join.
- strokeOpacityanyOf(float,
ExprRef
) The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthanyOf(float,
ExprRef
) The stroke width, in pixels.
- __init__(clip=Undefined, continuousHeight=Undefined, continuousWidth=Undefined, cornerRadius=Undefined, cursor=Undefined, discreteHeight=Undefined, discreteWidth=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, step=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, **kwds)#
Methods
__init__
([clip, continuousHeight, ...])copy
([deep, ignore])Return a copy of the object
from_dict
(dct[, validate, _wrapper_classes])Construct class from a dictionary representation
from_json
(json_string[, validate])Instantiate the object from a valid JSON string
resolve_references
([schema])Resolve references in the context of this object's schema or root schema.
to_dict
([validate, ignore, context])Return a dictionary representation of the object
to_json
([validate, ignore, context, indent, ...])Emit the JSON representation for this object as a string.
validate
(instance[, schema])Validate the instance against the class schema in the context of the rootschema.
validate_property
(name, value[, schema])Validate a property against property schema in the context of the rootschema