altair.AreaConfig#

class altair.AreaConfig(align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined, ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined, size=Undefined, smooth=Undefined, startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined, timeUnitBandPosition=Undefined, timeUnitBandSize=Undefined, tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)#

AreaConfig schema wrapper。

参数
aligndict, Align, ExprRef, Literal['left', 'center', 'right']

文本或范围标记(面积、条形、图像、矩形、规则)的水平对齐方式。可以是 "left""right""center" 之一。

注意:范围标记支持表达式引用。

angledict, float, ExprRef

文本的旋转角度,单位为度。

ariabool, dict, ExprRef

一个布尔标志,指示是否应包含 ARIA 属性(仅限 SVG 输出)。如果为 false,输出 SVG 元素将设置“aria-hidden”属性,从而将标记项从 ARIA 可访问性树中移除。

ariaRolestr, dict, ExprRef

ARIA 可访问性(仅限 SVG 输出)设置标记项的用户界面元素类型。如果指定,此属性将确定“role”属性。警告:此属性是实验性的,将来可能会更改。

ariaRoleDescriptionstr, dict, ExprRef

标记项角色的可读、作者本地化的描述,用于 ARIA 可访问性(仅限 SVG 输出)。如果指定,此属性将确定 “aria-roledescription”属性。警告:此属性是实验性的,将来可能会更改。

aspectbool, dict, ExprRef

是否保持图像标记的纵横比。

baselinedict, ExprRef, Baseline, TextBaseline, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']

对于文本标记,垂直文本基线。可以是 "alphabetic"(默认)、"top""middle""bottom""line-top""line-bottom" 之一,或提供其中一个有效值的表达式引用。"line-top""line-bottom" 的作用类似于 "top""bottom",但它们的计算是相对于 lineHeight 而非仅 fontSize

对于范围标记,标记的垂直对齐方式。可以是 "top""middle""bottom" 之一。

注意:范围标记支持表达式引用。

blenddict, Blend, ExprRef, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']

在当前背景上绘制项的颜色混合模式。可以使用任何有效的 CSS mix-blend-mode 值。

__默认值:__ "source-over"

colorstr, dict, Color, ExprRef, Gradient, HexColor, ColorName, LinearGradient, RadialGradient, 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']

默认颜色。

默认值: "#4682b4"

注意

  • 此属性不能在 样式配置 中使用。

  • fillstroke 属性具有比 color 更高的优先级,并将覆盖 color

cornerRadiusdict, float, ExprRef

圆角矩形或圆弧角的像素半径。

默认值: 0

cornerRadiusBottomLeftdict, float, ExprRef

圆角矩形左下角的像素半径。

默认值: 0

cornerRadiusBottomRightdict, float, ExprRef

圆角矩形右下角的像素半径。

默认值: 0

cornerRadiusTopLeftdict, float, ExprRef

圆角矩形右上角的像素半径。

默认值: 0

cornerRadiusTopRightdict, float, ExprRef

圆角矩形左上角的像素半径。

默认值: 0

cursordict, Cursor, ExprRef, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']

鼠标悬停在标记上时使用的光标。可以使用任何有效的 CSS 光标类型

descriptionstr, dict, ExprRef

标记项的文本描述,用于 ARIA 可访问性(仅限 SVG 输出)。如果指定,此属性将确定 “aria-label”属性

dirdict, ExprRef, Literal['ltr', 'rtl'], TextDirection

文本方向。可以是 "ltr"(从左到右)或 "rtl"(从右到左)。此属性决定了响应 limit 参数时,文本在哪一侧被截断。

默认值: "ltr"

dxdict, float, ExprRef

文本标签与其锚点之间的水平偏移(像素)。偏移在按angle属性旋转后应用。

dydict, float, ExprRef

文本标签与其锚点之间的垂直偏移(像素)。偏移在按angle属性旋转后应用。

ellipsisstr, dict, ExprRef

文本因响应 limit 参数而截断时使用的省略号字符串。

默认值: "…"

endAngledict, float, ExprRef

圆弧标记的结束角(弧度)。值为 0 表示向上(北),值增加时沿顺时针方向。

fillstr, dict, Color, ExprRef, Gradient, HexColor, ColorName, LinearGradient, RadialGradient, 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'], None

默认填充颜色。此属性优先级高于 config.color。设为 null 可移除填充。

默认值: (无)

fillOpacitydict, float, ExprRef

填充不透明度(值在 [0,1] 之间)。

默认值: 对于使用 pointtickcirclesquare 标记的非聚合图以及分层 bar 图表为 0.7,否则为 1

filledbool

标记的颜色是否应作为填充颜色而非描边颜色使用。

默认值: 对于所有 pointlinerule 标记以及 经纬网 数据源的 geoshape 标记为 false;否则为 true

注意:此属性不能在 样式配置 中使用。

fontstr, dict, ExprRef

文本使用的字体(例如,"Helvetica Neue")。

fontSizedict, float, ExprRef

字体大小,单位为像素。

默认值: 11

fontStylestr, dict, ExprRef, FontStyle

字体样式(例如,"italic")。

fontWeightdict, ExprRef, FontWeight, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]

字体粗细。可以是字符串(如 "bold", "normal")或数字(100, 200, 300, …, 900,其中 "normal" = 400"bold" = 700)。

heightdict, float, ExprRef

标记的高度。

hrefstr, dict, URI, ExprRef

鼠标单击时加载的 URL。如果定义,标记将作为超链接。

innerRadiusdict, float, ExprRef

圆弧标记的内半径(像素)。innerRadiusradius2 的别名。

默认值: 0

interpolatedict, ExprRef, Interpolate, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']

用于线和面积标记的线插值方法。以下之一:

  • "linear":分段线性段,如折线。

  • "linear-closed":闭合线性段形成多边形。

  • "step":在水平和垂直段之间交替,如阶梯函数。

  • "step-before":在垂直和水平段之间交替,如阶梯函数。

  • "step-after":在水平和垂直段之间交替,如阶梯函数。

  • "basis":B 样条,端点复制控制点。

  • "basis-open":开放 B 样条;可能不与起点或终点相交。

  • "basis-closed":闭合 B 样条,如环。

  • "cardinal":Cardinal 样条,端点复制控制点。

  • "cardinal-open":开放 Cardinal 样条;可能不与起点或终点相交,但会与其他控制点相交。

  • "cardinal-closed":闭合 Cardinal 样条,如环。

  • "bundle":等同于 basis,但使用 tension 参数来拉直样条。

  • "monotone":在 y 方向保持单调性的三次插值。

invalidMarkInvalidDataMode, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None

无效数据模式,定义了标记和对应的比例尺应如何表示无效值(连续比例尺中没有为无效值定义输出的 nullNaN)。

  • "filter"排除可视化中所有无效值(包括标记比例尺)。对于路径标记(线、面积、轨迹),此选项将创建连接有效点的路径,如同具有无效值的数据行不存在一样。

  • "break-paths-filter-domains" — 在无效值处中断路径标记(线、面积、轨迹)。对于非路径标记,这等同于 "filter"。所有比例尺域将排除这些过滤后的数据点。

  • "break-paths-show-domains" — 在无效值处中断路径(线、面积、轨迹)。隐藏非路径标记的无效值。所有比例尺域将包含这些过滤后的数据点(对于路径和非路径标记)。

  • "show"null — 显示标记和比例尺域中的所有数据点。每个比例尺将使用 config.scale.invalid 中为无效值定义的输出,如果未指定,默认情况下无效值将产生与零(如果比例尺包含零)或最小值(如果比例尺不包含零)相同的视觉值。

  • "break-paths-show-path-domains"(默认)— 这等同于路径标记(线/面积/轨迹)的 "break-paths-show-domains" 和非路径标记的 "filter"

注意:如果任何通道的比例尺在 config.scale.invalid 中定义了无效值的输出,则比例尺的所有值都将被视为“有效”,因为它们可以产生合理的输出。因此,此类通道的字段不会被过滤,也不会导致路径中断。

limitdict, float, ExprRef

文本标记的最大长度,单位为像素。如果渲染尺寸超出限制,文本值将自动截断。

默认值: 0 – 表示无限制

linebool, dict, OverlayMarkDef

一个标志,用于在面积标记上方叠加线,或一个定义叠加线属性的对象。

  • 如果此值是空对象({})或 true,将使用具有默认属性的线。

  • 如果此值为 false,则不会自动为面积标记添加任何线。

默认值: false

lineBreakstr, dict, ExprRef

一个分隔符,如换行符,用于将文本字符串分成多行。如果文本是数组值,则忽略此属性。

lineHeightdict, float, ExprRef

多行文本标记的行高(后续文本行之间的间距),单位为像素。

opacitydict, float, ExprRef

整体不透明度(值在 [0,1] 之间)。

默认值: 对于使用 pointtickcirclesquare 标记的非聚合图或分层 bar 图表为 0.7,否则为 1

orderbool, None

对于线和轨迹标记,可以将此 order 属性设为 nullfalse,使线条使用数据源中的原始顺序。

orientOrientation, Literal['horizontal', 'vertical']

非堆叠条形图、刻度图、面积图和折线图的方向。值为 horizontal(默认)或 vertical。

  • 对于条形、规则和刻度,这决定了条形和刻度的大小应应用于 x 维度还是 y 维度。

  • 对于面积,此属性决定了 Vega 输出的 orient 属性。

  • 对于线和轨迹标记,如果未指定 config.sortLineBy,此属性决定了线中点的排序顺序。对于堆叠图,这始终由堆叠的方向决定;因此明确指定的值将被忽略。

outerRadiusdict, float, ExprRef

圆弧标记的外半径(像素)。outerRadiusradius 的别名。

默认值: 0

padAngledict, float, ExprRef

应用于圆弧侧面的角度填充,单位为弧度。

pointbool, dict, Literal['transparent'], OverlayMarkDef

一个标志,用于在线或面积标记上方叠加点,或一个定义叠加点属性的对象。

  • 如果此属性为 "transparent",将使用透明点(用于增强工具提示和选择)。

  • 如果此属性是空对象({})或 true,将使用具有默认属性的填充点。

  • 如果此属性为 false,则不会自动为线或面积标记添加任何点。

默认值: false

radiusdict, float, ExprRef

对于圆弧标记,主(外)半径(像素)。

对于文本标记,文本相对于由 xy 属性确定的原点的极坐标径向偏移(像素)。

默认值: min(plot_width, plot_height)/2

radius2dict, float, ExprRef

圆弧标记的次(内)半径(像素)。

默认值: 0

shapestr, dict, ExprRef, SymbolShape

点标记的形状。支持的值包括:

  • 绘图形状:"circle", "square", "cross", "diamond", "triangle-up", "triangle-down", "triangle-right""triangle-left"

  • 线条符号 "stroke"

  • 中心方向性形状 "arrow", "wedge""triangle"

  • 自定义 SVG 路径字符串(为正确调整大小,自定义形状路径应定义在一个方形边界框内,其坐标在 x 和 y 维度上均介于 -1 到 1 之间。)

默认值: "circle"

sizedict, float, ExprRef

标记的默认大小。

  • 对于 point/circle/square,这表示标记的像素面积。请注意,此值设置的是符号的面积;边长将随此值的平方根增加。

  • 对于 bar,这表示条形的带状大小,单位为像素。

  • 对于 text,这表示字体大小,单位为像素。

默认值

  • 点、圆、方形标记为 30;width/height 的 step

  • 具有离散维度的条形标记为 2

  • 具有连续维度的条形标记为 5

  • 文本标记为 11

smoothbool, dict, ExprRef

一个布尔标志(默认为 true),指示图像在调整大小时是否应进行平滑处理。如果为 false,则应直接缩放单个像素,而不是通过平滑进行插值。对于 SVG 渲染,由于缺乏标准化,此选项在某些浏览器中可能不起作用。

startAngledict, float, ExprRef

弧形标记的起始角度,单位为弧度。值为 0 表示向上(北),值增加时顺时针方向。

strokestr, dict, Color, ExprRef, Gradient, HexColor, ColorName, LinearGradient, RadialGradient, 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’], None

默认描边颜色。此属性优先级高于 config.color。设置为 null 可移除描边。

默认值: (无)

strokeCapdict, ExprRef, StrokeCap, Literal[‘butt’, ‘round’, ‘square’]

线端样式,用于线段末端。可以是 "butt", "round", 或 "square" 之一。

默认值: "butt"

strokeDashdict, Sequence[float], ExprRef

用于创建虚线或点线的交替描边和空白长度数组。

strokeDashOffsetdict, float, ExprRef

开始绘制虚线数组时的偏移量(单位为像素)。

strokeJoindict, ExprRef, StrokeJoin, Literal[‘miter’, ‘round’, ‘bevel’]

描边线条连接方法。可以是 "miter", "round""bevel" 之一。

默认值: "miter"

strokeMiterLimitdict, float, ExprRef

将线条连接倒角时的斜接限制。

strokeOffsetdict, float, ExprRef

绘制组的描边和填充时的像素偏移量。如果未指定,默认行为是动态偏移描边组,使得 1 像素宽度的描边与像素网格对齐。

strokeOpacitydict, float, ExprRef

描边不透明度(值在 [0,1] 之间)。

默认值: 对于使用 pointtickcirclesquare 标记的非聚合图以及分层 bar 图表为 0.7,否则为 1

strokeWidthdict, float, ExprRef

描边宽度,单位为像素。

tensiondict, float, ExprRef

根据插值类型,设置张力参数(用于线和区域标记)。

textstr, dict, Text, Sequence[str], ExprRef

如果未指定 text 通道,则使用的占位符文本。

thetadict, float, ExprRef
  • 对于弧形标记,如果未指定 theta2,则为弧长(弧度);否则为起始弧角。(0 表示向上或“北”,值增加时顺时针方向。)

  • 对于文本标记,极坐标角度,单位为弧度。

theta2dict, float, ExprRef

弧形标记的结束角度,单位为弧度。0 表示向上或“北”,值增加时顺时针方向。

timeUnitBandPositionfloat

时间单位的默认相对带宽位置。如果设置为 0,标记将位于时间单位带宽步长的起始位置。如果设置为 0.5,标记将位于时间单位带宽步长的中间位置。

timeUnitBandSizefloat

时间单位的默认相对带宽大小。如果设置为 1,标记的带宽将等于时间单位带宽步长。如果设置为 0.5,标记的带宽将是时间单位带宽步长的一半。

tooltipstr, bool, dict, float, ExprRef, TooltipContent, None

鼠标悬停时显示的提示文本字符串,或者一个对象,用于定义提示文本应从哪些字段派生。

  • 如果 tooltiptrue{"content": "encoding"},则将使用 encoding 中的所有字段。

  • 如果 tooltip{"content": "data"},则将使用高亮数据显示点中出现的所有字段。

  • 如果设置为 nullfalse,则不使用提示文本。

有关 Vega-Lite 中提示文本的详细讨论,请参阅提示文本文档。

默认值: null

urlstr, dict, URI, ExprRef

图像标记的图像文件 URL。

widthdict, float, ExprRef

标记的宽度。

xdict, float, ExprRef, Literal[‘width’]

标记的 X 坐标,或未指定 x2width 的水平 "bar""area" 的宽度。

此通道的 value 可以是一个数字或字符串 "width",表示图表的宽度。

x2dict, float, ExprRef, Literal[‘width’]

用于范围标记 "area""bar""rect""rule" 的 X2 坐标。

此通道的 value 可以是一个数字或字符串 "width",表示图表的宽度。

ydict, float, ExprRef, Literal[‘height’]

标记的 Y 坐标,或未指定 y2height 的垂直 "bar""area" 的高度。

此通道的 value 可以是一个数字或字符串 "height",表示图表的高度。

y2dict, float, ExprRef, Literal[‘height’]

用于范围标记 "area""bar""rect""rule" 的 Y2 坐标。

此通道的 value 可以是一个数字或字符串 "height",表示图表的高度。

__init__(align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined, ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined, size=Undefined, smooth=Undefined, startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined, timeUnitBandPosition=Undefined, timeUnitBandSize=Undefined, tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)#

方法

__init__([align, angle, aria, ariaRole, ...])

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

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