altair.ViewConfig

class altair.ViewConfig(clip=Undefined, continuousHeight=Undefined, continuousWidth=Undefined, cornerRadius=Undefined, cursor=Undefined, discreteHeight=Undefined, discreteWidth=Undefined, fill=Undefined, fillOpacity=Undefined, height=Undefined, opacity=Undefined, step=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, width=Undefined, **kwds)

ViewConfig schema wrapper

Mapping(required=[])

Attributes
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)
cursorCursor

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)
heightfloat

Default height

Deprecated: Since Vega-Lite 4.0. Please use continuousHeight and discreteHeight instead.

opacityanyOf(float, ExprRef)

The overall opacity (value between [0,1]).

Default value: 0.7 for non-aggregate plots with point, tick, circle, or square marks or layered bar charts and 1 otherwise.

stepfloat

Default step size for x-/y- discrete fields.

strokeanyOf(Color, None, ExprRef)

The stroke color.

Default value: "#ddd"

strokeCapanyOf(StrokeCap, ExprRef)
strokeDashanyOf(List(float), ExprRef)
strokeDashOffsetanyOf(float, ExprRef)
strokeJoinanyOf(StrokeJoin, ExprRef)
strokeMiterLimitanyOf(float, ExprRef)
strokeOpacityanyOf(float, ExprRef)
strokeWidthanyOf(float, ExprRef)
widthfloat

Default width

Deprecated: Since Vega-Lite 4.0. Please use continuousWidth and discreteWidth instead.

__init__(clip=Undefined, continuousHeight=Undefined, continuousWidth=Undefined, cornerRadius=Undefined, cursor=Undefined, discreteHeight=Undefined, discreteWidth=Undefined, fill=Undefined, fillOpacity=Undefined, height=Undefined, opacity=Undefined, step=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, width=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