altair.VariableParameter#

class altair.VariableParameter(name=Undefined, bind=Undefined, expr=Undefined, react=Undefined, value=Undefined, **kwds)#

VariableParameter schema 包装器。

参数
namestr, ParameterName

变量参数的唯一名称。参数名称应为有效的 JavaScript 标识符:它们应仅包含字母数字字符(或“$”或“_”),且不能以数字开头。不能用作参数名称的保留关键字有“datum”、“event”、“item”和“parent”。

binddict, Binding, BindInput, BindRange, BindDirect, BindCheckbox, BindRadioSelect

将参数绑定到外部输入元素,例如滑块、选择列表或单选按钮组。

exprstr, Expr

参数值的表达式。此表达式可以包含其他参数,在这种情况下,参数将自动响应上游参数更改而更新。

reactbool

一个布尔标志(默认为 true),指示当任何上游信号依赖项更新时,更新表达式是否应自动重新计算。如果为 false,则更新表达式不会注册对其他信号的任何依赖项,即使是初始化时也是如此。

默认值: true

valueAny

参数的初始值

默认值: undefined

__init__(name=Undefined, bind=Undefined, expr=Undefined, react=Undefined, value=Undefined, **kwds)#

方法

__init__([name, bind, expr, react, value])

copy([deep, ignore])

返回对象的副本。

from_dict(dct[, validate])

从字典表示构造类。

from_json(json_string[, validate])

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

resolve_references([schema])

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

to_dict([validate, ignore, context])

返回对象的字典表示。

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

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

validate(instance[, schema])

根据根 schema 上下文中的类 schema 验证实例。

validate_property(name, value[, schema])

根据根 schema 上下文中的属性 schema 验证属性。