altair.SortByEncoding#
- class altair.SortByEncoding(encoding=Undefined, order=Undefined, **kwds)#
SortByEncoding 模式包装器。
- 参数:
- encoding
SortByChannel
, Literal[‘x’, ‘y’, ‘color’, ‘fill’, ‘stroke’, ‘strokeWidth’, ‘size’, ‘shape’, ‘fillOpacity’, ‘strokeOpacity’, ‘opacity’, ‘text’] 要排序的编码通道(例如,
"x"
、"y"
)- order
SortOrder
, Literal[‘ascending’, ‘descending’], None 排序顺序。以下之一:
"ascending"
(默认)、"descending"
或"null"
(不排序)。
- encoding
- __init__(encoding=Undefined, order=Undefined, **kwds)#
方法
__init__
([encoding, 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])在根模式的上下文中根据属性模式验证属性。