altair.ConcatChart#

class altair.ConcatChart(concat=Undefined, align=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined, columns=Undefined, config=Undefined, data=Undefined, datasets=Undefined, description=Undefined, name=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds)#

水平连接分面的图表。

__init__(concat=Undefined, align=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined, columns=Undefined, config=Undefined, data=Undefined, datasets=Undefined, description=Undefined, name=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds)#

请参考 TopLevelConcatSpec TopLevelConcatSpec 模式包装器。

参数:
concatSequence[dict, FacetSpec, LayerSpec, RepeatSpec, FacetedUnitSpec, LayerRepeatSpec, NonNormalizedSpec, NonLayerRepeatSpec, ConcatSpecGenericSpec, HConcatSpecGenericSpec, VConcatSpecGenericSpec]

要连接的视图列表。

aligndict, LayoutAlign, RowColLayoutAlign, Literal[‘all’, ‘each’, ‘none’]

应用于网格行和列的对齐方式。支持的字符串值包括 "all""each""none"

  • 对于 "none",将使用流式布局,其中相邻的子视图只是一个接一个地放置。

  • 对于 "each",子视图将对齐为整洁的网格结构,但每行或每列的大小可能有所不同。

  • 对于 "all",子视图将对齐,并且每行或每列的大小将基于观察到的最大尺寸相同。此属性的字符串值将应用于网格的行和列。

或者,可以使用形式为 {"row": string, "column": string} 的对象值来为行和列提供不同的对齐方式。

默认值: "all"

autosizedict, AutosizeType, AutoSizeParams, Literal[‘pad’, ‘none’, ‘fit’, ‘fit-x’, ‘fit-y’]

可视化尺寸的确定方式。如果是一个字符串,应为 "pad""fit""none" 之一。对象值还可以指定内容大小和自动调整大小的参数。

默认值: pad

backgroundstr, dict, Color, ExprRef, HexColor, ColorName, Literal[‘black’, ‘silver’, ‘gray’, ‘white’, ‘maroon’, ‘red’, ‘purple’, ‘fuchsia’, ‘green’, ‘lime’, ‘olive’, ‘yellow’, ‘navy’, ‘blue’, ‘teal’, ‘aqua’, ‘orange’, ‘aliceblue’, ‘antiquewhite’, ‘aquamarine’, ‘azure’, ‘beige’, ‘bisque’, ‘blanchedalmond’, ‘blueviolet’, ‘brown’, ‘burlywood’, ‘cadetblue’, ‘chartreuse’, ‘chocolate’, ‘coral’, ‘cornflowerblue’, ‘cornsilk’, ‘crimson’, ‘cyan’, ‘darkblue’, ‘darkcyan’, ‘darkgoldenrod’, ‘darkgray’, ‘darkgreen’, ‘darkgrey’, ‘darkkhaki’, ‘darkmagenta’, ‘darkolivegreen’, ‘darkorange’, ‘darkorchid’, ‘darkred’, ‘darksalmon’, ‘darkseagreen’, ‘darkslateblue’, ‘darkslategray’, ‘darkslategrey’, ‘darkturquoise’, ‘darkviolet’, ‘deeppink’, ‘deepskyblue’, ‘dimgray’, ‘dimgrey’, ‘dodgerblue’, ‘firebrick’, ‘floralwhite’, ‘forestgreen’, ‘gainsboro’, ‘ghostwhite’, ‘gold’, ‘goldenrod’, ‘greenyellow’, ‘grey’, ‘honeydew’, ‘hotpink’, ‘indianred’, ‘indigo’, ‘ivory’, ‘khaki’, ‘lavender’, ‘lavenderblush’, ‘lawngreen’, ‘lemonchiffon’, ‘lightblue’, ‘lightcoral’, ‘lightcyan’, ‘lightgoldenrodyellow’, ‘lightgray’, ‘lightgreen’, ‘lightgrey’, ‘lightpink’, ‘lightsalmon’, ‘lightseagreen’, ‘lightskyblue’, ‘lightslategray’, ‘lightslategrey’, ‘lightsteelblue’, ‘lightyellow’, ‘limegreen’, ‘linen’, ‘magenta’, ‘mediumaquamarine’, ‘mediumblue’, ‘mediumorchid’, ‘mediumpurple’, ‘mediumseagreen’, ‘mediumslateblue’, ‘mediumspringgreen’, ‘mediumturquoise’, ‘mediumvioletred’, ‘midnightblue’, ‘mintcream’, ‘mistyrose’, ‘moccasin’, ‘navajowhite’, ‘oldlace’, ‘olivedrab’, ‘orangered’, ‘orchid’, ‘palegoldenrod’, ‘palegreen’, ‘paleturquoise’, ‘palevioletred’, ‘papayawhip’, ‘peachpuff’, ‘peru’, ‘pink’, ‘plum’, ‘powderblue’, ‘rosybrown’, ‘royalblue’, ‘saddlebrown’, ‘salmon’, ‘sandybrown’, ‘seagreen’, ‘seashell’, ‘sienna’, ‘skyblue’, ‘slateblue’, ‘slategray’, ‘slategrey’, ‘snow’, ‘springgreen’, ‘steelblue’, ‘tan’, ‘thistle’, ‘tomato’, ‘turquoise’, ‘violet’, ‘wheat’, ‘whitesmoke’, ‘yellowgreen’, ‘rebeccapurple’]

用作整个视图背景的 CSS 颜色属性。

默认值: "white"

boundsLiteral[‘full’, ‘flush’]

用于确定子图范围的边界计算方法。可选值为 full(默认)或 flush

  • 如果设置为 full,将使用整个计算出的边界(包括坐标轴、标题和图例)。

  • 如果设置为 flush,将仅使用子视图指定的宽度和高度值。flush 设置在尝试将没有坐标轴或图例的子图放置到统一的网格结构中时很有用。

默认值: "full"

centerbool, dict, RowColboolean

布尔标志,指示子视图是否应相对于其各自的行或列居中。

形式为 {"row": boolean, "column": boolean} 的对象值可用于为行和列提供不同的居中值。

默认值: false

columnsfloat

视图组合布局中包含的列数。

默认值: undefined – 假定为无限数量的列(即单行)。这等同于 hconcat(对于 concat)以及使用 column 通道(对于 facetrepeat)。

注意:

  1. 此属性仅适用于

  • 通用的(可换行的)concat 操作符(非 hconcat/vconcat

  • 具有一个字段/重复定义的 facetrepeat 操作符(不带行/列嵌套)

2) 将 columns 设置为 1 等同于 vconcat(对于 concat)以及使用 row 通道(对于 facetrepeat)。

configdict, Config

Vega-Lite 配置对象。此属性只能在规范的顶层定义。

datadict, Data, UrlData, Generator, NamedData, DataSource, InlineData, SphereGenerator, SequenceGenerator, GraticuleGenerator, None]

描述数据源的对象。设置为 null 将忽略父级的数据源。如果未设置数据,则从父级派生。

datasetsdict, Datasets

用于命名数据集的全局数据存储。这是从名称到内联数据集的映射。它可以是对象数组、原始值数组或字符串。原始值数组将作为具有 data 属性的对象被摄取。

descriptionstr

此标记的描述,用于注释目的。

namestr

可视化名称,用于后续参考。

paddingdict, float, ExprRef, Padding

默认的可视化内边距,以像素为单位,从可视化画布边缘到数据矩形。如果是一个数字,则指定所有边的内边距。如果是一个对象,该值应具有 {"left": 5, "top": 5, "right": 5, "bottom": 5} 的格式,以指定可视化各边的内边距。

默认值: 5

paramsSequence[dict, TopLevelParameter, VariableParameter, TopLevelSelectionParameter]

参数化可视化的动态变量或选择。

resolvedict, Resolve

视图组合规范的比例尺、坐标轴和图例解析。

spacingdict, float, RowColnumber

组合操作符子视图之间的像素间距。形式为 {"row": number, "column": number} 的对象可用于设置行和列的不同间距值。

默认值: 取决于视图组合配置"spacing" 属性(默认为 20

titlestr, dict, Text, Sequence[str], TitleParams

图表的标题。

transformSequence[dict, Transform, BinTransform, FoldTransform, LoessTransform, PivotTransform, StackTransform, ExtentTransform, FilterTransform, ImputeTransform, LookupTransform, SampleTransform, WindowTransform, DensityTransform, FlattenTransform, QuantileTransform, TimeUnitTransform, AggregateTransform, CalculateTransform, RegressionTransform, JoinAggregateTransform]

数据转换数组,例如过滤和新字段计算。

usermetadict, Dict

将传递给 Vega 的可选元数据。此对象完全被 Vega 和 Vega-Lite 忽略,可用于自定义元数据。

$schemastr

Vega-Lite 规范的 JSON schema URL。除非有理由更改,否则请使用 https://vega.github.io/schema/vega-lite/v5.json。设置 $schema 属性可以在支持 JSON schema 的编辑器中实现自动验证和自动完成。

方法

__init__([concat, align, autosize, ...])

请参考 TopLevelConcatSpec TopLevelConcatSpec 模式包装器。

add_params(*params)

向图表添加一个或多个参数。

add_selection(*selections)

'add_selection' 已弃用。

configure([arc, area, aria, autosize, axis, ...])

请参考 Config Config 模式包装器。

configure_arc([align, angle, aria, ...])

请参考 RectConfig RectConfig 模式包装器。

configure_area([align, angle, aria, ...])

请参考 AreaConfig AreaConfig 模式包装器。

configure_axis([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisBand([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisBottom([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisDiscrete([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisLeft([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisPoint([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisQuantitative([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisRight([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisTemporal([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisTop([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisX([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXBand([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXDiscrete([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXPoint([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXQuantitative([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXTemporal([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisY([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYBand([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYDiscrete([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYPoint([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYQuantitative([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYTemporal([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_bar([align, angle, aria, ...])

请参考 BarConfig BarConfig 模式包装器。

configure_boxplot([box, extent, median, ...])

请参考 BoxPlotConfig BoxPlotConfig 模式包装器。

configure_circle([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_concat([columns, spacing])

请参考 CompositionConfig CompositionConfig 模式包装器。

configure_errorband([band, borders, extent, ...])

请参考 ErrorBandConfig ErrorBandConfig 模式包装器。

configure_errorbar([extent, rule, size, ...])

请参考 ErrorBarConfig ErrorBarConfig 模式包装器。

configure_facet([columns, spacing])

请参考 CompositionConfig CompositionConfig 模式包装器。

configure_geoshape([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_header([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_headerColumn([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_headerFacet([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_headerRow([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_image([align, angle, aria, ...])

请参考 RectConfig RectConfig 模式包装器。

configure_legend([aria, clipHeight, ...])

请参考 LegendConfig LegendConfig 模式包装器。

configure_line([align, angle, aria, ...])

请参考 LineConfig LineConfig 模式包装器。

configure_mark([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_point([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_projection([center, clipAngle, ...])

请参考 ProjectionConfig ProjectionConfig 模式包装器。

configure_range([category, diverging, ...])

请参考 RangeConfig RangeConfig 模式包装器。

configure_rect([align, angle, aria, ...])

请参考 RectConfig RectConfig 模式包装器。

configure_rule([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_scale([bandPaddingInner, ...])

请参考 ScaleConfig ScaleConfig 模式包装器。

configure_selection([interval, point])

请参考 SelectionConfig SelectionConfig 模式包装器。

configure_square([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_text([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_tick([align, angle, aria, ...])

请参考 TickConfig TickConfig 模式包装器。

configure_title([align, anchor, angle, ...])

请参考 TitleConfig TitleConfig 模式包装器。

configure_tooltipFormat([...])

请参考 FormatConfig FormatConfig 模式包装器。

configure_trail([align, angle, aria, ...])

请参考 LineConfig LineConfig 模式包装器。

configure_view([clip, continuousHeight, ...])

请参考 ViewConfig ViewConfig 模式包装器。

copy([deep, ignore])

返回对象的副本。

display([renderer, theme, actions])

在 Jupyter notebook 或 JupyterLab 中显示图表。

from_dict(dct[, validate])

从字典表示构建类。

from_json(json_string[, validate])

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

interactive([name, bind_x, bind_y])

使图表坐标轴比例尺具有交互性。

open_editor(*[, fullscreen])

使用默认浏览器在 Vega 图表编辑器中打开图表规范。

project([type, center, clipAngle, ...])

向图表添加地理投影。

properties(**kwargs)

设置图表的顶层属性。

repeat([repeat, row, column, layer, columns])

返回基于图表构建的 RepeatChart。

resolve_axis([x, y])

请参考 AxisResolveMap AxisResolveMap 模式包装器。

resolve_legend([angle, color, fill, ...])

请参考 LegendResolveMap LegendResolveMap 模式包装器。

resolve_references([schema])

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

resolve_scale([angle, color, fill, ...])

请参考 ScaleResolveMap ScaleResolveMap 模式包装器。

save(fp[, format, ...])

将图表保存为各种格式的文件。

serve([ip, port, n_retries, files, ...])

'serve' 已弃用。

显示()

使用活动渲染器显示图表。

to_dict([validate, format, ignore, context])

将图表转换为适合 JSON 导出的字典。

to_html([base_url, output_div, ...])

将 Vega/Vega-Lite 规范嵌入 HTML 页面。

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

将图表转换为 JSON 字符串。

to_url(*[, fullscreen])

将图表转换为 URL,该 URL 在 Vega 图表编辑器中打开图表规范。

transform_aggregate([aggregate, groupby])

添加一个 AggregateTransform 到 schema。

transform_bin([as_, field, bin])

添加一个 BinTransform 到 schema。

transform_calculate([as_, calculate])

添加一个 CalculateTransform 到 schema。

transform_density(density[, as_, bandwidth, ...])

添加一个 DensityTransform 到 spec。

transform_extent(extent, param)

添加一个 ExtentTransform 到 spec。

transform_filter([predicate, empty])

添加一个 FilterTransform 到 spec。

transform_flatten(flatten[, as_])

添加一个 FlattenTransform 到 schema。

transform_fold(fold[, as_])

添加一个 FoldTransform 到 spec。

transform_impute(impute, key[, frame, ...])

添加一个 ImputeTransform 到 schema。

transform_joinaggregate([joinaggregate, groupby])

添加一个 JoinAggregateTransform 到 schema。

transform_loess(on, loess[, as_, bandwidth, ...])

添加一个 LoessTransform 到 spec。

transform_lookup([lookup, from_, as_, default])

添加一个 DataLookupTransformSelectionLookupTransform 到图表。

transform_pivot(pivot, value[, groupby, ...])

添加一个 PivotTransform 到图表。

transform_quantile(quantile[, as_, groupby, ...])

添加一个 QuantileTransform 到图表。

transform_regression(on, regression[, as_, ...])

添加一个 RegressionTransform 到图表。

transform_sample([sample])

添加一个 SampleTransform 到 schema。

transform_stack(as_, stack, groupby[, ...])

添加一个 StackTransform 到 schema。

transform_timeunit([as_, field, timeUnit])

添加一个 TimeUnitTransform 到 schema。

transform_window([window, frame, groupby, ...])

添加一个 WindowTransform 到 schema。

transformed_data([row_limit, exclude])

评估 ConcatChart 的转换。

validate(instance[, schema])

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

validate_property(name, value[, schema])

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

属性

data