altair.VariableParameter#
- class altair.VariableParameter(name=Undefined, bind=Undefined, expr=Undefined, react=Undefined, value=Undefined, **kwds)#
变量参数模式包装。
- Parameters:
- namestr,
ParameterName 变量参数的唯一名称。参数名称应为有效的 JavaScript 标识符:它们只能包含字母数字字符(或“$”或“_”),并且不能以数字开头。不得用作参数名称的保留关键字包括“datum”、“event”、“item”和“parent”。
- binddict,
绑定,BindInput,BindRange,BindDirect,BindCheckbox,BindRadioSelect 将参数绑定到外部输入元素,如滑块、选择列表或单选按钮组。
- exprstr,
Expr 参数值的表达式。该表达式可以包含其他参数,在这种情况下,参数将在上游参数更改时自动更新。
- reactbool
一个布尔标志(默认
true),表示当任何上游信号依赖项更新时,更新表达式是否应该自动重新评估。如果false,更新表达式将不会注册对其他信号的任何依赖,甚至在初始化时也是如此。默认值:
true- valueAny
参数的初始值。
默认值:
undefined
- namestr,
- __init__(name=Undefined, bind=Undefined, expr=Undefined, react=Undefined, value=Undefined, **kwds)#
方法
__init__([name, bind, expr, react, value])copy([深度, 忽略])返回对象的副本。
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])在rootschema的上下文中验证实例是否符合类模式。
validate_property(name, value[, schema])在根架构的上下文中,根据属性架构验证一个属性。