altair.AutoSizeParams#

class altair.AutoSizeParams(contains=Undefined, resize=Undefined, type=Undefined, **kwds)#

AutoSizeParams 模式包装器。

参数:
containsLiteral[‘content’, ‘padding’]

确定应如何执行尺寸计算,为 "content""padding" 之一。默认设置 ("content") 将 width 和 height 设置解释为数据区域(绘图)尺寸,然后在其基础上添加 padding。相反,"padding" 设置将 padding 包含在视图尺寸计算中,因此 width 和 height 设置表示视图的预期尺寸。

默认值: "content"

resizebool

一个布尔标志,指示是否应在每次视图更新时重新计算 autosize 布局。

默认值: false

typeAutosizeType, Literal[‘pad’, ‘none’, ‘fit’, ‘fit-x’, ‘fit-y’]

尺寸格式类型。为 "pad", "fit", "fit-x", "fit-y", 或 "none" 之一。请参阅autosize type 文档了解每种类型的描述。

默认值: "pad"

__init__(contains=Undefined, resize=Undefined, type=Undefined, **kwds)#

方法

__init__([contains, resize, type])

返回对象的副本。

Return a copy of the object.

from_dict(dct[, validate])

从字典表示构建类。

from_json(json_string[, validate])

从有效的 JSON 字符串实例化对象。

resolve_references([schema])

在对象的模式或根模式的上下文中解析引用。

to_dict([validate, ignore, context])

返回对象的字典表示。

to_json([validate, indent, sort_keys, ...])

将此对象的 JSON 表示作为字符串发出。

validate(instance[, schema])

在根模式的上下文中,根据类模式验证实例。

validate_property(name, value[, schema])

在根模式的上下文中,根据属性模式验证属性。