altair.SortField#

class altair.SortField(field=Undefined, order=Undefined, **kwds)#

SortField 模式封装。

用于转换的排序定义

参数:
fieldstr, FieldName

要排序的字段名称。

orderSortOrder, Literal[‘ascending’, ‘descending’], None

是否按升序或降序对字段进行排序。以下之一:"ascending"(默认)、"descending",或 null(不排序)。

__init__(field=Undefined, order=Undefined, **kwds)#

方法

__init__([field, order])

copy([deep, ignore])

返回对象的副本。

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

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