1# The contents of this file are automatically written by 2# tools/generate_schema_wrapper.py. Do not modify directly. 3 4from altair.utils.schemapi import SchemaBase, Undefined, _subclasses 5 6import pkgutil 7import json 8 9def load_schema(): 10 """Load the json schema associated with this module's functions""" 11 return json.loads(pkgutil.get_data(__name__, 'vega-lite-schema.json').decode('utf-8')) 12 13 14class VegaLiteSchema(SchemaBase): 15 _rootschema = load_schema() 16 @classmethod 17 def _default_wrapper_classes(cls): 18 return _subclasses(VegaLiteSchema) 19 20 21class Root(VegaLiteSchema): 22 """Root schema wrapper 23 24 anyOf(:class:`TopLevelUnitSpec`, :class:`TopLevelFacetSpec`, :class:`TopLevelLayerSpec`, 25 :class:`TopLevelRepeatSpec`, :class:`TopLevelConcatSpec`, :class:`TopLevelVConcatSpec`, 26 :class:`TopLevelHConcatSpec`) 27 A Vega-Lite top-level specification. 28 This is the root class for all Vega-Lite specifications. 29 (The json schema is generated from this type.) 30 """ 31 _schema = VegaLiteSchema._rootschema 32 33 def __init__(self, *args, **kwds): 34 super(Root, self).__init__(*args, **kwds) 35 36 37class Aggregate(VegaLiteSchema): 38 """Aggregate schema wrapper 39 40 anyOf(:class:`AggregateOp`, :class:`ArgmaxDef`, :class:`ArgminDef`) 41 """ 42 _schema = {'$ref': '#/definitions/Aggregate'} 43 44 def __init__(self, *args, **kwds): 45 super(Aggregate, self).__init__(*args, **kwds) 46 47 48class AggregateOp(Aggregate): 49 """AggregateOp schema wrapper 50 51 enum('argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 52 'missing', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 53 'variance', 'variancep') 54 """ 55 _schema = {'$ref': '#/definitions/AggregateOp'} 56 57 def __init__(self, *args): 58 super(AggregateOp, self).__init__(*args) 59 60 61class AggregatedFieldDef(VegaLiteSchema): 62 """AggregatedFieldDef schema wrapper 63 64 Mapping(required=[op, as]) 65 66 Attributes 67 ---------- 68 69 op : :class:`AggregateOp` 70 The aggregation operation to apply to the fields (e.g., sum, average or count). 71 See the `full list of supported aggregation operations 72 <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ 73 for more information. 74 field : :class:`FieldName` 75 The data field for which to compute aggregate function. This is required for all 76 aggregation operations except ``"count"``. 77 as : :class:`FieldName` 78 The output field names to use for each aggregated field. 79 """ 80 _schema = {'$ref': '#/definitions/AggregatedFieldDef'} 81 82 def __init__(self, op=Undefined, field=Undefined, **kwds): 83 super(AggregatedFieldDef, self).__init__(op=op, field=field, **kwds) 84 85 86class Align(VegaLiteSchema): 87 """Align schema wrapper 88 89 enum('left', 'center', 'right') 90 """ 91 _schema = {'$ref': '#/definitions/Align'} 92 93 def __init__(self, *args): 94 super(Align, self).__init__(*args) 95 96 97class AnyMark(VegaLiteSchema): 98 """AnyMark schema wrapper 99 100 anyOf(:class:`CompositeMark`, :class:`CompositeMarkDef`, :class:`Mark`, :class:`MarkDef`) 101 """ 102 _schema = {'$ref': '#/definitions/AnyMark'} 103 104 def __init__(self, *args, **kwds): 105 super(AnyMark, self).__init__(*args, **kwds) 106 107 108class AreaConfig(VegaLiteSchema): 109 """AreaConfig schema wrapper 110 111 Mapping(required=[]) 112 113 Attributes 114 ---------- 115 116 align : :class:`Align` 117 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 118 angle : float 119 The rotation angle of the text, in degrees. 120 baseline : :class:`TextBaseline` 121 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 122 123 **Default value:** ``"middle"`` 124 color : :class:`Color` 125 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 126 ``color`` and will override ``color``. 127 128 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 129 ``"#4682b4"`` 130 131 **Note:** This property cannot be used in a `style config 132 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 133 cornerRadius : float 134 The radius in pixels of rounded rectangle corners. 135 136 **Default value:** ``0`` 137 cursor : :class:`Cursor` 138 The mouse cursor used over the mark. Any valid `CSS cursor type 139 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 140 dir : :class:`Dir` 141 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 142 (right-to-left). This property determines on which side is truncated in response to 143 the limit parameter. 144 145 **Default value:** ``"ltr"`` 146 dx : float 147 The horizontal offset, in pixels, between the text label and its anchor point. The 148 offset is applied after rotation by the *angle* property. 149 dy : float 150 The vertical offset, in pixels, between the text label and its anchor point. The 151 offset is applied after rotation by the *angle* property. 152 ellipsis : string 153 The ellipsis string for text truncated in response to the limit parameter. 154 155 **Default value:** ``"…"`` 156 fill : :class:`Color` 157 Default Fill Color. This has higher precedence than ``config.color`` 158 159 **Default value:** (None) 160 fillOpacity : float 161 The fill opacity (value between [0,1]). 162 163 **Default value:** ``1`` 164 filled : boolean 165 Whether the mark's color should be used as fill color instead of stroke color. 166 167 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 168 ``true``. 169 170 **Note:** This property cannot be used in a `style config 171 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 172 font : string 173 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 174 fontSize : float 175 The font size, in pixels. 176 fontStyle : :class:`FontStyle` 177 The font style (e.g., ``"italic"`` ). 178 fontWeight : :class:`FontWeight` 179 The font weight. 180 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 181 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 182 ). 183 height : float 184 Height of the marks. 185 href : string 186 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 187 interpolate : :class:`Interpolate` 188 The line interpolation method to use for line and area marks. One of the following: 189 190 191 * ``"linear"`` : piecewise linear segments, as in a polyline. 192 * ``"linear-closed"`` : close the linear segments to form a polygon. 193 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 194 function. 195 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 196 step function. 197 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 198 step function. 199 * ``"basis"`` : a B-spline, with control point duplication on the ends. 200 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 201 * ``"basis-closed"`` : a closed B-spline, as in a loop. 202 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 203 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 204 but will intersect other control points. 205 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 206 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 207 straighten the spline. 208 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 209 limit : float 210 The maximum length of the text mark in pixels. The text value will be automatically 211 truncated if the rendered size exceeds the limit. 212 213 **Default value:** ``0``, indicating no limit 214 line : anyOf(boolean, :class:`OverlayMarkDef`) 215 A flag for overlaying line on top of area marks, or an object defining the 216 properties of the overlayed lines. 217 218 219 If this value is an empty object ( ``{}`` ) or ``true``, lines with default 220 properties will be used. 221 222 If this value is ``false``, no lines would be automatically added to area marks. 223 224 **Default value:** ``false``. 225 opacity : float 226 The overall opacity (value between [0,1]). 227 228 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 229 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 230 order : anyOf(None, boolean) 231 For line and trail marks, this ``order`` property can be set to ``null`` or 232 ``false`` to make the lines use the original order in the data sources. 233 orient : :class:`Orientation` 234 The orientation of a non-stacked bar, tick, area, and line charts. 235 The value is either horizontal (default) or vertical. 236 237 238 * For bar, rule and tick, this determines whether the size of the bar and tick 239 should be applied to x or y dimension. 240 * For area, this property determines the orient property of the Vega output. 241 * For line and trail marks, this property determines the sort order of the points in 242 the line 243 if ``config.sortLineBy`` is not specified. 244 For stacked charts, this is always determined by the orientation of the stack; 245 therefore explicitly specified value will be ignored. 246 point : anyOf(boolean, :class:`OverlayMarkDef`, enum('transparent')) 247 A flag for overlaying points on top of line or area marks, or an object defining the 248 properties of the overlayed points. 249 250 251 If this property is ``"transparent"``, transparent points will be used (for 252 enhancing tooltips and selections). 253 254 If this property is an empty object ( ``{}`` ) or ``true``, filled points with 255 default properties will be used. 256 257 If this property is ``false``, no points would be automatically added to line or 258 area marks. 259 260 **Default value:** ``false``. 261 radius : float 262 Polar coordinate radial offset, in pixels, of the text label from the origin 263 determined by the ``x`` and ``y`` properties. 264 shape : string 265 Shape of the point marks. Supported values include: 266 267 268 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 269 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 270 ``"triangle-left"``. 271 * the line symbol ``"stroke"`` 272 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 273 * a custom `SVG path string 274 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 275 sizing, custom shape paths should be defined within a square bounding box with 276 coordinates ranging from -1 to 1 along both the x and y dimensions.) 277 278 **Default value:** ``"circle"`` 279 size : float 280 Default size for marks. 281 282 283 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 284 marks. For example: in the case of circles, the radius is determined in part by 285 the square root of the size value. 286 * For ``bar``, this represents the band size of the bar, in pixels. 287 * For ``text``, this represents the font size, in pixels. 288 289 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 290 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 291 ``11`` for text marks. 292 stroke : :class:`Color` 293 Default Stroke Color. This has higher precedence than ``config.color`` 294 295 **Default value:** (None) 296 strokeCap : :class:`StrokeCap` 297 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 298 ``"square"``. 299 300 **Default value:** ``"square"`` 301 strokeDash : List(float) 302 An array of alternating stroke, space lengths for creating dashed or dotted lines. 303 strokeDashOffset : float 304 The offset (in pixels) into which to begin drawing with the stroke dash array. 305 strokeJoin : :class:`StrokeJoin` 306 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 307 308 **Default value:** ``"miter"`` 309 strokeMiterLimit : float 310 The miter limit at which to bevel a line join. 311 strokeOpacity : float 312 The stroke opacity (value between [0,1]). 313 314 **Default value:** ``1`` 315 strokeWidth : float 316 The stroke width, in pixels. 317 tension : float 318 Depending on the interpolation type, sets the tension parameter (for line and area 319 marks). 320 text : string 321 Placeholder text if the ``text`` channel is not specified 322 theta : float 323 Polar coordinate angle, in radians, of the text label from the origin determined by 324 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 325 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 326 radians, with ``0`` indicating "north". 327 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 328 The tooltip text string to show upon mouse hover or an object defining which fields 329 should the tooltip be derived from. 330 331 332 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 333 will be used. 334 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 335 highlighted data point will be used. 336 * If set to ``null``, then no tooltip will be used. 337 width : float 338 Width of the marks. 339 x : anyOf(float, enum('width')) 340 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 341 specified ``x2`` or ``width``. 342 343 The ``value`` of this channel can be a number or a string ``"width"`` for the width 344 of the plot. 345 x2 : anyOf(float, enum('width')) 346 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 347 348 The ``value`` of this channel can be a number or a string ``"width"`` for the width 349 of the plot. 350 y : anyOf(float, enum('height')) 351 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 352 specified ``y2`` or ``height``. 353 354 The ``value`` of this channel can be a number or a string ``"height"`` for the 355 height of the plot. 356 y2 : anyOf(float, enum('width')) 357 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 358 359 The ``value`` of this channel can be a number or a string ``"height"`` for the 360 height of the plot. 361 """ 362 _schema = {'$ref': '#/definitions/AreaConfig'} 363 364 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, 365 cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, 366 ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, 367 font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, 368 height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined, 369 line=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined, 370 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 371 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 372 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 373 strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, 374 tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, 375 y2=Undefined, **kwds): 376 super(AreaConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color, 377 cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, 378 dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, 379 filled=filled, font=font, fontSize=fontSize, 380 fontStyle=fontStyle, fontWeight=fontWeight, height=height, 381 href=href, interpolate=interpolate, limit=limit, line=line, 382 opacity=opacity, order=order, orient=orient, point=point, 383 radius=radius, shape=shape, size=size, stroke=stroke, 384 strokeCap=strokeCap, strokeDash=strokeDash, 385 strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin, 386 strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity, 387 strokeWidth=strokeWidth, tension=tension, text=text, 388 theta=theta, tooltip=tooltip, width=width, x=x, x2=x2, y=y, 389 y2=y2, **kwds) 390 391 392class ArgmaxDef(Aggregate): 393 """ArgmaxDef schema wrapper 394 395 Mapping(required=[argmax]) 396 397 Attributes 398 ---------- 399 400 argmax : string 401 402 """ 403 _schema = {'$ref': '#/definitions/ArgmaxDef'} 404 405 def __init__(self, argmax=Undefined, **kwds): 406 super(ArgmaxDef, self).__init__(argmax=argmax, **kwds) 407 408 409class ArgminDef(Aggregate): 410 """ArgminDef schema wrapper 411 412 Mapping(required=[argmin]) 413 414 Attributes 415 ---------- 416 417 argmin : string 418 419 """ 420 _schema = {'$ref': '#/definitions/ArgminDef'} 421 422 def __init__(self, argmin=Undefined, **kwds): 423 super(ArgminDef, self).__init__(argmin=argmin, **kwds) 424 425 426class AutoSizeParams(VegaLiteSchema): 427 """AutoSizeParams schema wrapper 428 429 Mapping(required=[]) 430 431 Attributes 432 ---------- 433 434 contains : enum('content', 'padding') 435 Determines how size calculation should be performed, one of ``"content"`` or 436 ``"padding"``. The default setting ( ``"content"`` ) interprets the width and height 437 settings as the data rectangle (plotting) dimensions, to which padding is then 438 added. In contrast, the ``"padding"`` setting includes the padding within the view 439 size calculations, such that the width and height settings indicate the **total** 440 intended size of the view. 441 442 **Default value** : ``"content"`` 443 resize : boolean 444 A boolean flag indicating if autosize layout should be re-calculated on every view 445 update. 446 447 **Default value** : ``false`` 448 type : :class:`AutosizeType` 449 The sizing format type. One of ``"pad"``, ``"fit"`` or ``"none"``. See the `autosize 450 type <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ documentation for 451 descriptions of each. 452 453 **Default value** : ``"pad"`` 454 """ 455 _schema = {'$ref': '#/definitions/AutoSizeParams'} 456 457 def __init__(self, contains=Undefined, resize=Undefined, type=Undefined, **kwds): 458 super(AutoSizeParams, self).__init__(contains=contains, resize=resize, type=type, **kwds) 459 460 461class AutosizeType(VegaLiteSchema): 462 """AutosizeType schema wrapper 463 464 enum('pad', 'fit', 'none') 465 """ 466 _schema = {'$ref': '#/definitions/AutosizeType'} 467 468 def __init__(self, *args): 469 super(AutosizeType, self).__init__(*args) 470 471 472class Axis(VegaLiteSchema): 473 """Axis schema wrapper 474 475 Mapping(required=[]) 476 477 Attributes 478 ---------- 479 480 bandPosition : float 481 An interpolation fraction indicating where, for ``band`` scales, axis ticks should 482 be positioned. A value of ``0`` places ticks at the left edge of their bands. A 483 value of ``0.5`` places ticks in the middle of their bands. 484 485 **Default value:** ``0.5`` 486 domain : boolean 487 A boolean flag indicating if the domain (the axis baseline) should be included as 488 part of the axis. 489 490 **Default value:** ``true`` 491 domainColor : :class:`Color` 492 Color of axis domain line. 493 494 **Default value:** ``"gray"``. 495 domainDash : List(float) 496 An array of alternating [stroke, space] lengths for dashed domain lines. 497 domainDashOffset : float 498 The pixel offset at which to start drawing with the domain dash array. 499 domainOpacity : float 500 Opacity of the axis domain line. 501 domainWidth : float 502 Stroke width of axis domain line 503 504 **Default value:** ``1`` 505 format : string 506 The text formatting pattern for labels of guides (axes, legends, headers) and text 507 marks. 508 509 510 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 511 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 512 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 513 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 514 515 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 516 for more examples. 517 518 **Default value:** Derived from `numberFormat 519 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 520 format and from `timeFormat 521 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 522 format. 523 formatType : enum('number', 'time') 524 The format type for labels ( ``"number"`` or ``"time"`` ). 525 526 **Default value:** 527 528 529 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 530 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 531 ``timeUnit``. 532 grid : boolean 533 A boolean flag indicating if grid lines should be included as part of the axis 534 535 **Default value:** ``true`` for `continuous scales 536 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not 537 binned; otherwise, ``false``. 538 gridColor : :class:`Color` 539 Color of gridlines. 540 541 **Default value:** ``"lightGray"``. 542 gridDash : List(float) 543 An array of alternating [stroke, space] lengths for dashed grid lines. 544 gridDashOffset : float 545 The pixel offset at which to start drawing with the grid dash array. 546 gridOpacity : float 547 The stroke opacity of grid (value between [0,1]) 548 549 **Default value:** ``1`` 550 gridWidth : float 551 The grid width, in pixels. 552 553 **Default value:** ``1`` 554 labelAlign : :class:`Align` 555 Horizontal text alignment of axis tick labels, overriding the default setting for 556 the current axis orientation. 557 labelAngle : float 558 The rotation angle of the axis labels. 559 560 **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise. 561 labelBaseline : :class:`TextBaseline` 562 Vertical text baseline of axis tick labels, overriding the default setting for the 563 current axis orientation. Can be ``"top"``, ``"middle"``, ``"bottom"``, or 564 ``"alphabetic"``. 565 labelBound : anyOf(float, boolean) 566 Indicates if labels should be hidden if they exceed the axis range. If ``false`` 567 (the default) no bounds overlap analysis is performed. If ``true``, labels will be 568 hidden if they exceed the axis range by more than 1 pixel. If this property is a 569 number, it specifies the pixel tolerance: the maximum amount by which a label 570 bounding box may exceed the axis range. 571 572 **Default value:** ``false``. 573 labelColor : :class:`Color` 574 The color of the tick label, can be in hex color code or regular color name. 575 labelFlush : anyOf(boolean, float) 576 Indicates if the first and last axis labels should be aligned flush with the scale 577 range. Flush alignment for a horizontal axis will left-align the first label and 578 right-align the last label. For vertical axes, bottom and top text baselines are 579 applied instead. If this property is a number, it also indicates the number of 580 pixels by which to offset the first and last labels; for example, a value of 2 will 581 flush-align the first and last labels and also push them 2 pixels outward from the 582 center of the axis. The additional adjustment can sometimes help the labels better 583 visually group with corresponding axis ticks. 584 585 **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``. 586 labelFlushOffset : float 587 Indicates the number of pixels by which to offset flush-adjusted labels. For 588 example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the 589 center of the axis. Offsets can help the labels better visually group with 590 corresponding axis ticks. 591 592 **Default value:** ``0``. 593 labelFont : string 594 The font of the tick label. 595 labelFontSize : float 596 The font size of the label, in pixels. 597 labelFontStyle : :class:`FontStyle` 598 Font style of the title. 599 labelFontWeight : :class:`FontWeight` 600 Font weight of axis tick labels. 601 labelLimit : float 602 Maximum allowed pixel width of axis tick labels. 603 604 **Default value:** ``180`` 605 labelOpacity : float 606 The opacity of the labels. 607 labelOverlap : :class:`LabelOverlap` 608 The strategy to use for resolving overlap of axis labels. If ``false`` (the 609 default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a 610 strategy of removing every other label is used (this works well for standard linear 611 axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing 612 any labels that overlaps with the last visible label (this often works better for 613 log-scaled axes). 614 615 **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"`` 616 for log scales; otherwise ``false``. 617 labelPadding : float 618 The padding, in pixels, between axis and text labels. 619 620 **Default value:** ``2`` 621 labelSeparation : float 622 The minimum separation that must be between label bounding boxes for them to be 623 considered non-overlapping (default ``0`` ). This property is ignored if 624 *labelOverlap* resolution is not enabled. 625 labels : boolean 626 A boolean flag indicating if labels should be included as part of the axis. 627 628 **Default value:** ``true``. 629 maxExtent : float 630 The maximum extent in pixels that axis ticks and labels should use. This determines 631 a maximum offset value for axis titles. 632 633 **Default value:** ``undefined``. 634 minExtent : float 635 The minimum extent in pixels that axis ticks and labels should use. This determines 636 a minimum offset value for axis titles. 637 638 **Default value:** ``30`` for y-axis; ``undefined`` for x-axis. 639 offset : float 640 The offset, in pixels, by which to displace the axis from the edge of the enclosing 641 group or data rectangle. 642 643 **Default value:** derived from the `axis config 644 <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__ 's 645 ``offset`` ( ``0`` by default) 646 orient : :class:`AxisOrient` 647 The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or 648 ``"right"``. The orientation can be used to further specialize the axis type (e.g., 649 a y-axis oriented towards the right edge of the chart). 650 651 **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes. 652 position : float 653 The anchor position of the axis in pixels. For x-axes with top or bottom 654 orientation, this sets the axis group x coordinate. For y-axes with left or right 655 orientation, this sets the axis group y coordinate. 656 657 **Default value** : ``0`` 658 tickColor : :class:`Color` 659 The color of the axis's tick. 660 661 **Default value:** ``"gray"`` 662 tickCount : float 663 A desired number of ticks, for axes visualizing quantitative scales. The resulting 664 number may be different so that values are "nice" (multiples of 2, 5, 10) and lie 665 within the underlying scale's range. 666 tickDash : List(float) 667 An array of alternating [stroke, space] lengths for dashed tick mark lines. 668 tickDashOffset : float 669 The pixel offset at which to start drawing with the tick mark dash array. 670 tickExtra : boolean 671 Boolean flag indicating if an extra axis tick should be added for the initial 672 position of the axis. This flag is useful for styling axes for ``band`` scales such 673 that ticks are placed on band boundaries rather in the middle of a band. Use in 674 conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``. 675 tickMinStep : float 676 The minimum desired step between axis ticks, in terms of scale domain values. For 677 example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. 678 If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if 679 necessary, to enforce the minimum step value. 680 681 **Default value** : ``undefined`` 682 tickOffset : float 683 Position offset in pixels to apply to ticks, labels, and gridlines. 684 tickOpacity : float 685 Opacity of the ticks. 686 tickRound : boolean 687 Boolean flag indicating if pixel position values should be rounded to the nearest 688 integer. 689 690 **Default value:** ``true`` 691 tickSize : float 692 The size in pixels of axis ticks. 693 694 **Default value:** ``5`` 695 tickWidth : float 696 The width, in pixels, of ticks. 697 698 **Default value:** ``1`` 699 ticks : boolean 700 Boolean value that determines whether the axis should include ticks. 701 702 **Default value:** ``true`` 703 title : anyOf(string, None) 704 A title for the field. If ``null``, the title will be removed. 705 706 **Default value:** derived from the field's name and transformation function ( 707 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 708 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 709 field is binned or has a time unit applied, the applied function is shown in 710 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 711 Otherwise, the title is simply the field name. 712 713 **Notes** : 714 715 1) You can customize the default field title format by providing the `fieldTitle 716 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 717 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 718 function via the compile function's options 719 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 720 721 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 722 defined, axis/header/legend title will be used. 723 titleAlign : :class:`Align` 724 Horizontal text alignment of axis titles. 725 titleAnchor : :class:`TitleAnchor` 726 Text anchor position for placing axis titles. 727 titleAngle : float 728 Angle in degrees of axis titles. 729 titleBaseline : :class:`TextBaseline` 730 Vertical text baseline for axis titles. 731 titleColor : :class:`Color` 732 Color of the title, can be in hex color code or regular color name. 733 titleFont : string 734 Font of the title. (e.g., ``"Helvetica Neue"`` ). 735 titleFontSize : float 736 Font size of the title. 737 titleFontStyle : :class:`FontStyle` 738 Font style of the title. 739 titleFontWeight : :class:`FontWeight` 740 Font weight of the title. 741 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 742 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 743 ). 744 titleLimit : float 745 Maximum allowed pixel width of axis titles. 746 titleOpacity : float 747 Opacity of the axis title. 748 titlePadding : float 749 The padding, in pixels, between title and axis. 750 titleX : float 751 X-coordinate of the axis title relative to the axis group. 752 titleY : float 753 Y-coordinate of the axis title relative to the axis group. 754 values : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`)) 755 Explicitly set the visible axis tick values. 756 zindex : float 757 A non-negative integer indicating the z-index of the axis. 758 If zindex is 0, axes should be drawn behind all chart elements. 759 To put them in front, use ``"zindex = 1"``. 760 761 **Default value:** ``1`` (in front of the marks) for actual axis and ``0`` (behind 762 the marks) for grids. 763 """ 764 _schema = {'$ref': '#/definitions/Axis'} 765 766 def __init__(self, bandPosition=Undefined, domain=Undefined, domainColor=Undefined, 767 domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, 768 domainWidth=Undefined, format=Undefined, formatType=Undefined, grid=Undefined, 769 gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, 770 gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, 771 labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, 772 labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, 773 labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, 774 labelLimit=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, 775 labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, 776 maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, 777 position=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, 778 tickDashOffset=Undefined, tickExtra=Undefined, tickMinStep=Undefined, 779 tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, 780 tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, 781 titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, 782 titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, 783 titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, 784 titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, 785 values=Undefined, zindex=Undefined, **kwds): 786 super(Axis, self).__init__(bandPosition=bandPosition, domain=domain, domainColor=domainColor, 787 domainDash=domainDash, domainDashOffset=domainDashOffset, 788 domainOpacity=domainOpacity, domainWidth=domainWidth, format=format, 789 formatType=formatType, grid=grid, gridColor=gridColor, 790 gridDash=gridDash, gridDashOffset=gridDashOffset, 791 gridOpacity=gridOpacity, gridWidth=gridWidth, labelAlign=labelAlign, 792 labelAngle=labelAngle, labelBaseline=labelBaseline, 793 labelBound=labelBound, labelColor=labelColor, labelFlush=labelFlush, 794 labelFlushOffset=labelFlushOffset, labelFont=labelFont, 795 labelFontSize=labelFontSize, labelFontStyle=labelFontStyle, 796 labelFontWeight=labelFontWeight, labelLimit=labelLimit, 797 labelOpacity=labelOpacity, labelOverlap=labelOverlap, 798 labelPadding=labelPadding, labelSeparation=labelSeparation, 799 labels=labels, maxExtent=maxExtent, minExtent=minExtent, 800 offset=offset, orient=orient, position=position, tickColor=tickColor, 801 tickCount=tickCount, tickDash=tickDash, 802 tickDashOffset=tickDashOffset, tickExtra=tickExtra, 803 tickMinStep=tickMinStep, tickOffset=tickOffset, 804 tickOpacity=tickOpacity, tickRound=tickRound, tickSize=tickSize, 805 tickWidth=tickWidth, ticks=ticks, title=title, titleAlign=titleAlign, 806 titleAnchor=titleAnchor, titleAngle=titleAngle, 807 titleBaseline=titleBaseline, titleColor=titleColor, 808 titleFont=titleFont, titleFontSize=titleFontSize, 809 titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight, 810 titleLimit=titleLimit, titleOpacity=titleOpacity, 811 titlePadding=titlePadding, titleX=titleX, titleY=titleY, 812 values=values, zindex=zindex, **kwds) 813 814 815class AxisConfig(VegaLiteSchema): 816 """AxisConfig schema wrapper 817 818 Mapping(required=[]) 819 820 Attributes 821 ---------- 822 823 bandPosition : float 824 An interpolation fraction indicating where, for ``band`` scales, axis ticks should 825 be positioned. A value of ``0`` places ticks at the left edge of their bands. A 826 value of ``0.5`` places ticks in the middle of their bands. 827 828 **Default value:** ``0.5`` 829 domain : boolean 830 A boolean flag indicating if the domain (the axis baseline) should be included as 831 part of the axis. 832 833 **Default value:** ``true`` 834 domainColor : :class:`Color` 835 Color of axis domain line. 836 837 **Default value:** ``"gray"``. 838 domainDash : List(float) 839 An array of alternating [stroke, space] lengths for dashed domain lines. 840 domainDashOffset : float 841 The pixel offset at which to start drawing with the domain dash array. 842 domainOpacity : float 843 Opacity of the axis domain line. 844 domainWidth : float 845 Stroke width of axis domain line 846 847 **Default value:** ``1`` 848 grid : boolean 849 A boolean flag indicating if grid lines should be included as part of the axis 850 851 **Default value:** ``true`` for `continuous scales 852 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not 853 binned; otherwise, ``false``. 854 gridColor : :class:`Color` 855 Color of gridlines. 856 857 **Default value:** ``"lightGray"``. 858 gridDash : List(float) 859 An array of alternating [stroke, space] lengths for dashed grid lines. 860 gridDashOffset : float 861 The pixel offset at which to start drawing with the grid dash array. 862 gridOpacity : float 863 The stroke opacity of grid (value between [0,1]) 864 865 **Default value:** ``1`` 866 gridWidth : float 867 The grid width, in pixels. 868 869 **Default value:** ``1`` 870 labelAlign : :class:`Align` 871 Horizontal text alignment of axis tick labels, overriding the default setting for 872 the current axis orientation. 873 labelAngle : float 874 The rotation angle of the axis labels. 875 876 **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise. 877 labelBaseline : :class:`TextBaseline` 878 Vertical text baseline of axis tick labels, overriding the default setting for the 879 current axis orientation. Can be ``"top"``, ``"middle"``, ``"bottom"``, or 880 ``"alphabetic"``. 881 labelBound : anyOf(float, boolean) 882 Indicates if labels should be hidden if they exceed the axis range. If ``false`` 883 (the default) no bounds overlap analysis is performed. If ``true``, labels will be 884 hidden if they exceed the axis range by more than 1 pixel. If this property is a 885 number, it specifies the pixel tolerance: the maximum amount by which a label 886 bounding box may exceed the axis range. 887 888 **Default value:** ``false``. 889 labelColor : :class:`Color` 890 The color of the tick label, can be in hex color code or regular color name. 891 labelFlush : anyOf(boolean, float) 892 Indicates if the first and last axis labels should be aligned flush with the scale 893 range. Flush alignment for a horizontal axis will left-align the first label and 894 right-align the last label. For vertical axes, bottom and top text baselines are 895 applied instead. If this property is a number, it also indicates the number of 896 pixels by which to offset the first and last labels; for example, a value of 2 will 897 flush-align the first and last labels and also push them 2 pixels outward from the 898 center of the axis. The additional adjustment can sometimes help the labels better 899 visually group with corresponding axis ticks. 900 901 **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``. 902 labelFlushOffset : float 903 Indicates the number of pixels by which to offset flush-adjusted labels. For 904 example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the 905 center of the axis. Offsets can help the labels better visually group with 906 corresponding axis ticks. 907 908 **Default value:** ``0``. 909 labelFont : string 910 The font of the tick label. 911 labelFontSize : float 912 The font size of the label, in pixels. 913 labelFontStyle : :class:`FontStyle` 914 Font style of the title. 915 labelFontWeight : :class:`FontWeight` 916 Font weight of axis tick labels. 917 labelLimit : float 918 Maximum allowed pixel width of axis tick labels. 919 920 **Default value:** ``180`` 921 labelOpacity : float 922 The opacity of the labels. 923 labelOverlap : :class:`LabelOverlap` 924 The strategy to use for resolving overlap of axis labels. If ``false`` (the 925 default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a 926 strategy of removing every other label is used (this works well for standard linear 927 axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing 928 any labels that overlaps with the last visible label (this often works better for 929 log-scaled axes). 930 931 **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"`` 932 for log scales; otherwise ``false``. 933 labelPadding : float 934 The padding, in pixels, between axis and text labels. 935 936 **Default value:** ``2`` 937 labelSeparation : float 938 The minimum separation that must be between label bounding boxes for them to be 939 considered non-overlapping (default ``0`` ). This property is ignored if 940 *labelOverlap* resolution is not enabled. 941 labels : boolean 942 A boolean flag indicating if labels should be included as part of the axis. 943 944 **Default value:** ``true``. 945 maxExtent : float 946 The maximum extent in pixels that axis ticks and labels should use. This determines 947 a maximum offset value for axis titles. 948 949 **Default value:** ``undefined``. 950 minExtent : float 951 The minimum extent in pixels that axis ticks and labels should use. This determines 952 a minimum offset value for axis titles. 953 954 **Default value:** ``30`` for y-axis; ``undefined`` for x-axis. 955 orient : :class:`AxisOrient` 956 The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or 957 ``"right"``. The orientation can be used to further specialize the axis type (e.g., 958 a y-axis oriented towards the right edge of the chart). 959 960 **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes. 961 shortTimeLabels : boolean 962 Whether month names and weekday names should be abbreviated. 963 964 **Default value:** ``false`` 965 tickColor : :class:`Color` 966 The color of the axis's tick. 967 968 **Default value:** ``"gray"`` 969 tickDash : List(float) 970 An array of alternating [stroke, space] lengths for dashed tick mark lines. 971 tickDashOffset : float 972 The pixel offset at which to start drawing with the tick mark dash array. 973 tickExtra : boolean 974 Boolean flag indicating if an extra axis tick should be added for the initial 975 position of the axis. This flag is useful for styling axes for ``band`` scales such 976 that ticks are placed on band boundaries rather in the middle of a band. Use in 977 conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``. 978 tickOffset : float 979 Position offset in pixels to apply to ticks, labels, and gridlines. 980 tickOpacity : float 981 Opacity of the ticks. 982 tickRound : boolean 983 Boolean flag indicating if pixel position values should be rounded to the nearest 984 integer. 985 986 **Default value:** ``true`` 987 tickSize : float 988 The size in pixels of axis ticks. 989 990 **Default value:** ``5`` 991 tickWidth : float 992 The width, in pixels, of ticks. 993 994 **Default value:** ``1`` 995 ticks : boolean 996 Boolean value that determines whether the axis should include ticks. 997 998 **Default value:** ``true`` 999 title : None 1000 Set to null to disable title for the axis, legend, or header. 1001 titleAlign : :class:`Align` 1002 Horizontal text alignment of axis titles. 1003 titleAnchor : :class:`TitleAnchor` 1004 Text anchor position for placing axis titles. 1005 titleAngle : float 1006 Angle in degrees of axis titles. 1007 titleBaseline : :class:`TextBaseline` 1008 Vertical text baseline for axis titles. 1009 titleColor : :class:`Color` 1010 Color of the title, can be in hex color code or regular color name. 1011 titleFont : string 1012 Font of the title. (e.g., ``"Helvetica Neue"`` ). 1013 titleFontSize : float 1014 Font size of the title. 1015 titleFontStyle : :class:`FontStyle` 1016 Font style of the title. 1017 titleFontWeight : :class:`FontWeight` 1018 Font weight of the title. 1019 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 1020 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 1021 ). 1022 titleLimit : float 1023 Maximum allowed pixel width of axis titles. 1024 titleOpacity : float 1025 Opacity of the axis title. 1026 titlePadding : float 1027 The padding, in pixels, between title and axis. 1028 titleX : float 1029 X-coordinate of the axis title relative to the axis group. 1030 titleY : float 1031 Y-coordinate of the axis title relative to the axis group. 1032 """ 1033 _schema = {'$ref': '#/definitions/AxisConfig'} 1034 1035 def __init__(self, bandPosition=Undefined, domain=Undefined, domainColor=Undefined, 1036 domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, 1037 domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, 1038 gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, 1039 labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, 1040 labelBound=Undefined, labelColor=Undefined, labelFlush=Undefined, 1041 labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, 1042 labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, 1043 labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, 1044 labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, 1045 orient=Undefined, shortTimeLabels=Undefined, tickColor=Undefined, tickDash=Undefined, 1046 tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, 1047 tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, 1048 ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, 1049 titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, 1050 titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, 1051 titleFontWeight=Undefined, titleLimit=Undefined, titleOpacity=Undefined, 1052 titlePadding=Undefined, titleX=Undefined, titleY=Undefined, **kwds): 1053 super(AxisConfig, self).__init__(bandPosition=bandPosition, domain=domain, 1054 domainColor=domainColor, domainDash=domainDash, 1055 domainDashOffset=domainDashOffset, domainOpacity=domainOpacity, 1056 domainWidth=domainWidth, grid=grid, gridColor=gridColor, 1057 gridDash=gridDash, gridDashOffset=gridDashOffset, 1058 gridOpacity=gridOpacity, gridWidth=gridWidth, 1059 labelAlign=labelAlign, labelAngle=labelAngle, 1060 labelBaseline=labelBaseline, labelBound=labelBound, 1061 labelColor=labelColor, labelFlush=labelFlush, 1062 labelFlushOffset=labelFlushOffset, labelFont=labelFont, 1063 labelFontSize=labelFontSize, labelFontStyle=labelFontStyle, 1064 labelFontWeight=labelFontWeight, labelLimit=labelLimit, 1065 labelOpacity=labelOpacity, labelOverlap=labelOverlap, 1066 labelPadding=labelPadding, labelSeparation=labelSeparation, 1067 labels=labels, maxExtent=maxExtent, minExtent=minExtent, 1068 orient=orient, shortTimeLabels=shortTimeLabels, 1069 tickColor=tickColor, tickDash=tickDash, 1070 tickDashOffset=tickDashOffset, tickExtra=tickExtra, 1071 tickOffset=tickOffset, tickOpacity=tickOpacity, 1072 tickRound=tickRound, tickSize=tickSize, tickWidth=tickWidth, 1073 ticks=ticks, title=title, titleAlign=titleAlign, 1074 titleAnchor=titleAnchor, titleAngle=titleAngle, 1075 titleBaseline=titleBaseline, titleColor=titleColor, 1076 titleFont=titleFont, titleFontSize=titleFontSize, 1077 titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight, 1078 titleLimit=titleLimit, titleOpacity=titleOpacity, 1079 titlePadding=titlePadding, titleX=titleX, titleY=titleY, **kwds) 1080 1081 1082class AxisOrient(VegaLiteSchema): 1083 """AxisOrient schema wrapper 1084 1085 enum('top', 'bottom', 'left', 'right') 1086 """ 1087 _schema = {'$ref': '#/definitions/AxisOrient'} 1088 1089 def __init__(self, *args): 1090 super(AxisOrient, self).__init__(*args) 1091 1092 1093class AxisResolveMap(VegaLiteSchema): 1094 """AxisResolveMap schema wrapper 1095 1096 Mapping(required=[]) 1097 1098 Attributes 1099 ---------- 1100 1101 x : :class:`ResolveMode` 1102 1103 y : :class:`ResolveMode` 1104 1105 """ 1106 _schema = {'$ref': '#/definitions/AxisResolveMap'} 1107 1108 def __init__(self, x=Undefined, y=Undefined, **kwds): 1109 super(AxisResolveMap, self).__init__(x=x, y=y, **kwds) 1110 1111 1112class BaseLegendLayout(VegaLiteSchema): 1113 """BaseLegendLayout schema wrapper 1114 1115 Mapping(required=[]) 1116 1117 Attributes 1118 ---------- 1119 1120 anchor : :class:`TitleAnchor` 1121 The anchor point for legend orient group layout. 1122 bounds : :class:`LayoutBounds` 1123 The bounds calculation to use for legend orient group layout. 1124 center : anyOf(boolean, :class:`SignalRef`) 1125 A flag to center legends within a shared orient group. 1126 direction : anyOf(:class:`Orientation`, :class:`SignalRef`) 1127 The layout direction for legend orient group layout. 1128 margin : anyOf(float, :class:`SignalRef`) 1129 The pixel margin between legends within a orient group. 1130 offset : anyOf(float, :class:`SignalRef`) 1131 The pixel offset from the chart body for a legend orient group. 1132 """ 1133 _schema = {'$ref': '#/definitions/BaseLegendLayout'} 1134 1135 def __init__(self, anchor=Undefined, bounds=Undefined, center=Undefined, direction=Undefined, 1136 margin=Undefined, offset=Undefined, **kwds): 1137 super(BaseLegendLayout, self).__init__(anchor=anchor, bounds=bounds, center=center, 1138 direction=direction, margin=margin, offset=offset, **kwds) 1139 1140 1141class BaseMarkConfig(VegaLiteSchema): 1142 """BaseMarkConfig schema wrapper 1143 1144 Mapping(required=[]) 1145 1146 Attributes 1147 ---------- 1148 1149 align : :class:`Align` 1150 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 1151 angle : float 1152 The rotation angle of the text, in degrees. 1153 baseline : :class:`TextBaseline` 1154 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 1155 1156 **Default value:** ``"middle"`` 1157 cornerRadius : float 1158 The radius in pixels of rounded rectangle corners. 1159 1160 **Default value:** ``0`` 1161 cursor : :class:`Cursor` 1162 The mouse cursor used over the mark. Any valid `CSS cursor type 1163 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 1164 dir : :class:`Dir` 1165 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 1166 (right-to-left). This property determines on which side is truncated in response to 1167 the limit parameter. 1168 1169 **Default value:** ``"ltr"`` 1170 dx : float 1171 The horizontal offset, in pixels, between the text label and its anchor point. The 1172 offset is applied after rotation by the *angle* property. 1173 dy : float 1174 The vertical offset, in pixels, between the text label and its anchor point. The 1175 offset is applied after rotation by the *angle* property. 1176 ellipsis : string 1177 The ellipsis string for text truncated in response to the limit parameter. 1178 1179 **Default value:** ``"…"`` 1180 fill : :class:`Color` 1181 Default Fill Color. This has higher precedence than ``config.color`` 1182 1183 **Default value:** (None) 1184 fillOpacity : float 1185 The fill opacity (value between [0,1]). 1186 1187 **Default value:** ``1`` 1188 font : string 1189 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 1190 fontSize : float 1191 The font size, in pixels. 1192 fontStyle : :class:`FontStyle` 1193 The font style (e.g., ``"italic"`` ). 1194 fontWeight : :class:`FontWeight` 1195 The font weight. 1196 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 1197 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 1198 ). 1199 height : float 1200 Height of the marks. 1201 href : string 1202 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 1203 interpolate : :class:`Interpolate` 1204 The line interpolation method to use for line and area marks. One of the following: 1205 1206 1207 * ``"linear"`` : piecewise linear segments, as in a polyline. 1208 * ``"linear-closed"`` : close the linear segments to form a polygon. 1209 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 1210 function. 1211 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 1212 step function. 1213 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 1214 step function. 1215 * ``"basis"`` : a B-spline, with control point duplication on the ends. 1216 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 1217 * ``"basis-closed"`` : a closed B-spline, as in a loop. 1218 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 1219 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 1220 but will intersect other control points. 1221 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 1222 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 1223 straighten the spline. 1224 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 1225 limit : float 1226 The maximum length of the text mark in pixels. The text value will be automatically 1227 truncated if the rendered size exceeds the limit. 1228 1229 **Default value:** ``0``, indicating no limit 1230 opacity : float 1231 The overall opacity (value between [0,1]). 1232 1233 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 1234 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 1235 orient : :class:`Orientation` 1236 The orientation of a non-stacked bar, tick, area, and line charts. 1237 The value is either horizontal (default) or vertical. 1238 1239 1240 * For bar, rule and tick, this determines whether the size of the bar and tick 1241 should be applied to x or y dimension. 1242 * For area, this property determines the orient property of the Vega output. 1243 * For line and trail marks, this property determines the sort order of the points in 1244 the line 1245 if ``config.sortLineBy`` is not specified. 1246 For stacked charts, this is always determined by the orientation of the stack; 1247 therefore explicitly specified value will be ignored. 1248 radius : float 1249 Polar coordinate radial offset, in pixels, of the text label from the origin 1250 determined by the ``x`` and ``y`` properties. 1251 shape : string 1252 Shape of the point marks. Supported values include: 1253 1254 1255 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 1256 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 1257 ``"triangle-left"``. 1258 * the line symbol ``"stroke"`` 1259 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 1260 * a custom `SVG path string 1261 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 1262 sizing, custom shape paths should be defined within a square bounding box with 1263 coordinates ranging from -1 to 1 along both the x and y dimensions.) 1264 1265 **Default value:** ``"circle"`` 1266 size : float 1267 The pixel area each the point/circle/square. 1268 For example: in the case of circles, the radius is determined in part by the square 1269 root of the size value. 1270 1271 **Default value:** ``30`` 1272 stroke : :class:`Color` 1273 Default Stroke Color. This has higher precedence than ``config.color`` 1274 1275 **Default value:** (None) 1276 strokeCap : :class:`StrokeCap` 1277 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 1278 ``"square"``. 1279 1280 **Default value:** ``"square"`` 1281 strokeDash : List(float) 1282 An array of alternating stroke, space lengths for creating dashed or dotted lines. 1283 strokeDashOffset : float 1284 The offset (in pixels) into which to begin drawing with the stroke dash array. 1285 strokeJoin : :class:`StrokeJoin` 1286 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 1287 1288 **Default value:** ``"miter"`` 1289 strokeMiterLimit : float 1290 The miter limit at which to bevel a line join. 1291 strokeOpacity : float 1292 The stroke opacity (value between [0,1]). 1293 1294 **Default value:** ``1`` 1295 strokeWidth : float 1296 The stroke width, in pixels. 1297 tension : float 1298 Depending on the interpolation type, sets the tension parameter (for line and area 1299 marks). 1300 text : string 1301 Placeholder text if the ``text`` channel is not specified 1302 theta : float 1303 Polar coordinate angle, in radians, of the text label from the origin determined by 1304 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 1305 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 1306 radians, with ``0`` indicating "north". 1307 tooltip : Any 1308 The tooltip text to show upon mouse hover. 1309 width : float 1310 Width of the marks. 1311 x : anyOf(float, enum('width')) 1312 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 1313 specified ``x2`` or ``width``. 1314 1315 The ``value`` of this channel can be a number or a string ``"width"`` for the width 1316 of the plot. 1317 x2 : anyOf(float, enum('width')) 1318 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 1319 1320 The ``value`` of this channel can be a number or a string ``"width"`` for the width 1321 of the plot. 1322 y : anyOf(float, enum('height')) 1323 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 1324 specified ``y2`` or ``height``. 1325 1326 The ``value`` of this channel can be a number or a string ``"height"`` for the 1327 height of the plot. 1328 y2 : anyOf(float, enum('width')) 1329 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 1330 1331 The ``value`` of this channel can be a number or a string ``"height"`` for the 1332 height of the plot. 1333 """ 1334 _schema = {'$ref': '#/definitions/BaseMarkConfig'} 1335 1336 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, cornerRadius=Undefined, 1337 cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, 1338 fill=Undefined, fillOpacity=Undefined, font=Undefined, fontSize=Undefined, 1339 fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, 1340 interpolate=Undefined, limit=Undefined, opacity=Undefined, orient=Undefined, 1341 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 1342 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 1343 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 1344 strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, 1345 tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, 1346 y2=Undefined, **kwds): 1347 super(BaseMarkConfig, self).__init__(align=align, angle=angle, baseline=baseline, 1348 cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, 1349 dy=dy, ellipsis=ellipsis, fill=fill, 1350 fillOpacity=fillOpacity, font=font, fontSize=fontSize, 1351 fontStyle=fontStyle, fontWeight=fontWeight, height=height, 1352 href=href, interpolate=interpolate, limit=limit, 1353 opacity=opacity, orient=orient, radius=radius, shape=shape, 1354 size=size, stroke=stroke, strokeCap=strokeCap, 1355 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 1356 strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit, 1357 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 1358 tension=tension, text=text, theta=theta, tooltip=tooltip, 1359 width=width, x=x, x2=x2, y=y, y2=y2, **kwds) 1360 1361 1362class BaseTitleConfig(VegaLiteSchema): 1363 """BaseTitleConfig schema wrapper 1364 1365 Mapping(required=[]) 1366 1367 Attributes 1368 ---------- 1369 1370 align : :class:`Align` 1371 1372 anchor : :class:`TitleAnchor` 1373 The anchor position for placing the title. One of ``"start"``, ``"middle"``, or 1374 ``"end"``. For example, with an orientation of top these anchor positions map to a 1375 left-, center-, or right-aligned title. 1376 angle : float 1377 Angle in degrees of title text. 1378 baseline : :class:`TextBaseline` 1379 Vertical text baseline for title text. One of ``"top"``, ``"middle"``, ``"bottom"``, 1380 or ``"alphabetic"``. 1381 color : :class:`Color` 1382 Text color for title text. 1383 dx : float 1384 Delta offset for title text x-coordinate. 1385 dy : float 1386 Delta offset for title text y-coordinate. 1387 font : string 1388 Font name for title text. 1389 fontSize : float 1390 Font size in pixels for title text. 1391 1392 **Default value:** ``10``. 1393 fontStyle : :class:`FontStyle` 1394 Font style for title text. 1395 fontWeight : :class:`FontWeight` 1396 Font weight for title text. 1397 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 1398 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 1399 ). 1400 frame : :class:`TitleFrame` 1401 The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative 1402 to the full bounding box) or ``"group"`` (to anchor relative to the group width or 1403 height). 1404 limit : float 1405 The maximum allowed length in pixels of legend labels. 1406 offset : float 1407 The orthogonal offset in pixels by which to displace the title from its position 1408 along the edge of the chart. 1409 orient : :class:`TitleOrient` 1410 Default title orientation ( ``"top"``, ``"bottom"``, ``"left"``, or ``"right"`` ) 1411 """ 1412 _schema = {'$ref': '#/definitions/BaseTitleConfig'} 1413 1414 def __init__(self, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined, 1415 color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined, 1416 fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, limit=Undefined, 1417 offset=Undefined, orient=Undefined, **kwds): 1418 super(BaseTitleConfig, self).__init__(align=align, anchor=anchor, angle=angle, 1419 baseline=baseline, color=color, dx=dx, dy=dy, font=font, 1420 fontSize=fontSize, fontStyle=fontStyle, 1421 fontWeight=fontWeight, frame=frame, limit=limit, 1422 offset=offset, orient=orient, **kwds) 1423 1424 1425class BinParams(VegaLiteSchema): 1426 """BinParams schema wrapper 1427 1428 Mapping(required=[]) 1429 Binning properties or boolean flag for determining whether to bin data or not. 1430 1431 Attributes 1432 ---------- 1433 1434 anchor : float 1435 A value in the binned domain at which to anchor the bins, shifting the bin 1436 boundaries if necessary to ensure that a boundary aligns with the anchor value. 1437 1438 **Default Value:** the minimum bin extent value 1439 base : float 1440 The number base to use for automatic bin determination (default is base 10). 1441 1442 **Default value:** ``10`` 1443 binned : boolean 1444 When set to true, Vega-Lite treats the input data as already binned. 1445 divide : List(float) 1446 Scale factors indicating allowable subdivisions. The default value is [5, 2], which 1447 indicates that for base 10 numbers (the default base), the method may consider 1448 dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the 1449 method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might 1450 also satisfy the given constraints. 1451 1452 **Default value:** ``[5, 2]`` 1453 extent : List(float) 1454 A two-element ( ``[min, max]`` ) array indicating the range of desired bin values. 1455 maxbins : float 1456 Maximum number of bins. 1457 1458 **Default value:** ``6`` for ``row``, ``column`` and ``shape`` channels; ``10`` for 1459 other channels 1460 minstep : float 1461 A minimum allowable step size (particularly useful for integer values). 1462 nice : boolean 1463 If true (the default), attempts to make the bin boundaries use human-friendly 1464 boundaries, such as multiples of ten. 1465 step : float 1466 An exact step size to use between bins. 1467 1468 **Note:** If provided, options such as maxbins will be ignored. 1469 steps : List(float) 1470 An array of allowable step sizes to choose from. 1471 """ 1472 _schema = {'$ref': '#/definitions/BinParams'} 1473 1474 def __init__(self, anchor=Undefined, base=Undefined, binned=Undefined, divide=Undefined, 1475 extent=Undefined, maxbins=Undefined, minstep=Undefined, nice=Undefined, step=Undefined, 1476 steps=Undefined, **kwds): 1477 super(BinParams, self).__init__(anchor=anchor, base=base, binned=binned, divide=divide, 1478 extent=extent, maxbins=maxbins, minstep=minstep, nice=nice, 1479 step=step, steps=steps, **kwds) 1480 1481 1482class Binding(VegaLiteSchema): 1483 """Binding schema wrapper 1484 1485 anyOf(:class:`BindCheckbox`, :class:`BindRadioSelect`, :class:`BindRange`, 1486 :class:`InputBinding`) 1487 """ 1488 _schema = {'$ref': '#/definitions/Binding'} 1489 1490 def __init__(self, *args, **kwds): 1491 super(Binding, self).__init__(*args, **kwds) 1492 1493 1494class BindCheckbox(Binding): 1495 """BindCheckbox schema wrapper 1496 1497 Mapping(required=[input]) 1498 1499 Attributes 1500 ---------- 1501 1502 input : enum('checkbox') 1503 1504 debounce : float 1505 1506 element : :class:`Element` 1507 1508 name : string 1509 1510 type : string 1511 1512 """ 1513 _schema = {'$ref': '#/definitions/BindCheckbox'} 1514 1515 def __init__(self, input=Undefined, debounce=Undefined, element=Undefined, name=Undefined, 1516 type=Undefined, **kwds): 1517 super(BindCheckbox, self).__init__(input=input, debounce=debounce, element=element, name=name, 1518 type=type, **kwds) 1519 1520 1521class BindRadioSelect(Binding): 1522 """BindRadioSelect schema wrapper 1523 1524 Mapping(required=[input, options]) 1525 1526 Attributes 1527 ---------- 1528 1529 input : enum('radio', 'select') 1530 1531 options : List(Any) 1532 1533 debounce : float 1534 1535 element : :class:`Element` 1536 1537 name : string 1538 1539 type : string 1540 1541 """ 1542 _schema = {'$ref': '#/definitions/BindRadioSelect'} 1543 1544 def __init__(self, input=Undefined, options=Undefined, debounce=Undefined, element=Undefined, 1545 name=Undefined, type=Undefined, **kwds): 1546 super(BindRadioSelect, self).__init__(input=input, options=options, debounce=debounce, 1547 element=element, name=name, type=type, **kwds) 1548 1549 1550class BindRange(Binding): 1551 """BindRange schema wrapper 1552 1553 Mapping(required=[input]) 1554 1555 Attributes 1556 ---------- 1557 1558 input : enum('range') 1559 1560 debounce : float 1561 1562 element : :class:`Element` 1563 1564 max : float 1565 1566 min : float 1567 1568 name : string 1569 1570 step : float 1571 1572 type : string 1573 1574 """ 1575 _schema = {'$ref': '#/definitions/BindRange'} 1576 1577 def __init__(self, input=Undefined, debounce=Undefined, element=Undefined, max=Undefined, 1578 min=Undefined, name=Undefined, step=Undefined, type=Undefined, **kwds): 1579 super(BindRange, self).__init__(input=input, debounce=debounce, element=element, max=max, 1580 min=min, name=name, step=step, type=type, **kwds) 1581 1582 1583class BoxPlotConfig(VegaLiteSchema): 1584 """BoxPlotConfig schema wrapper 1585 1586 Mapping(required=[]) 1587 1588 Attributes 1589 ---------- 1590 1591 box : anyOf(boolean, :class:`MarkConfig`) 1592 1593 extent : anyOf(enum('min-max'), float) 1594 The extent of the whiskers. Available options include: 1595 1596 1597 * ``"min-max"`` : min and max are the lower and upper whiskers respectively. 1598 * A number representing multiple of the interquartile range. This number will be 1599 multiplied by the IQR to determine whisker boundary, which spans from the smallest 1600 data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where 1601 *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile 1602 range ( *Q3-Q1* ). 1603 1604 **Default value:** ``1.5``. 1605 median : anyOf(boolean, :class:`MarkConfig`) 1606 1607 outliers : anyOf(boolean, :class:`MarkConfig`) 1608 1609 rule : anyOf(boolean, :class:`MarkConfig`) 1610 1611 size : float 1612 Size of the box and median tick of a box plot 1613 ticks : anyOf(boolean, :class:`MarkConfig`) 1614 1615 """ 1616 _schema = {'$ref': '#/definitions/BoxPlotConfig'} 1617 1618 def __init__(self, box=Undefined, extent=Undefined, median=Undefined, outliers=Undefined, 1619 rule=Undefined, size=Undefined, ticks=Undefined, **kwds): 1620 super(BoxPlotConfig, self).__init__(box=box, extent=extent, median=median, outliers=outliers, 1621 rule=rule, size=size, ticks=ticks, **kwds) 1622 1623 1624class BrushConfig(VegaLiteSchema): 1625 """BrushConfig schema wrapper 1626 1627 Mapping(required=[]) 1628 1629 Attributes 1630 ---------- 1631 1632 fill : :class:`Color` 1633 The fill color of the interval mark. 1634 1635 **Default value:** ``#333333`` 1636 fillOpacity : float 1637 The fill opacity of the interval mark (a value between 0 and 1). 1638 1639 **Default value:** ``0.125`` 1640 stroke : :class:`Color` 1641 The stroke color of the interval mark. 1642 1643 **Default value:** ``#ffffff`` 1644 strokeDash : List(float) 1645 An array of alternating stroke and space lengths, 1646 for creating dashed or dotted lines. 1647 strokeDashOffset : float 1648 The offset (in pixels) with which to begin drawing the stroke dash array. 1649 strokeOpacity : float 1650 The stroke opacity of the interval mark (a value between 0 and 1). 1651 strokeWidth : float 1652 The stroke width of the interval mark. 1653 """ 1654 _schema = {'$ref': '#/definitions/BrushConfig'} 1655 1656 def __init__(self, fill=Undefined, fillOpacity=Undefined, stroke=Undefined, strokeDash=Undefined, 1657 strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, **kwds): 1658 super(BrushConfig, self).__init__(fill=fill, fillOpacity=fillOpacity, stroke=stroke, 1659 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 1660 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, **kwds) 1661 1662 1663class Color(VegaLiteSchema): 1664 """Color schema wrapper 1665 1666 anyOf(:class:`ColorName`, :class:`HexColor`, string) 1667 """ 1668 _schema = {'$ref': '#/definitions/Color'} 1669 1670 def __init__(self, *args, **kwds): 1671 super(Color, self).__init__(*args, **kwds) 1672 1673 1674class ColorName(Color): 1675 """ColorName schema wrapper 1676 1677 enum('black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 1678 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 1679 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 1680 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 1681 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 1682 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 1683 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 1684 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 1685 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 1686 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 1687 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 1688 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 1689 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 1690 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 1691 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 1692 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 1693 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 1694 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 1695 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 1696 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 1697 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 1698 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 1699 'whitesmoke', 'yellowgreen', 'rebeccapurple') 1700 """ 1701 _schema = {'$ref': '#/definitions/ColorName'} 1702 1703 def __init__(self, *args): 1704 super(ColorName, self).__init__(*args) 1705 1706 1707class CompositeMark(AnyMark): 1708 """CompositeMark schema wrapper 1709 1710 anyOf(:class:`BoxPlot`, :class:`ErrorBar`, :class:`ErrorBand`) 1711 """ 1712 _schema = {'$ref': '#/definitions/CompositeMark'} 1713 1714 def __init__(self, *args, **kwds): 1715 super(CompositeMark, self).__init__(*args, **kwds) 1716 1717 1718class BoxPlot(CompositeMark): 1719 """BoxPlot schema wrapper 1720 1721 enum('boxplot') 1722 """ 1723 _schema = {'$ref': '#/definitions/BoxPlot'} 1724 1725 def __init__(self, *args): 1726 super(BoxPlot, self).__init__(*args) 1727 1728 1729class CompositeMarkDef(AnyMark): 1730 """CompositeMarkDef schema wrapper 1731 1732 anyOf(:class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`) 1733 """ 1734 _schema = {'$ref': '#/definitions/CompositeMarkDef'} 1735 1736 def __init__(self, *args, **kwds): 1737 super(CompositeMarkDef, self).__init__(*args, **kwds) 1738 1739 1740class BoxPlotDef(CompositeMarkDef): 1741 """BoxPlotDef schema wrapper 1742 1743 Mapping(required=[type]) 1744 1745 Attributes 1746 ---------- 1747 1748 type : :class:`BoxPlot` 1749 The mark type. This could a primitive mark type 1750 (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``, 1751 ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` ) 1752 or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ). 1753 box : anyOf(boolean, :class:`MarkConfig`) 1754 1755 clip : boolean 1756 Whether a composite mark be clipped to the enclosing group’s width and height. 1757 color : :class:`Color` 1758 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 1759 ``color`` and will override ``color``. 1760 1761 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 1762 ``"#4682b4"`` 1763 1764 **Note:** This property cannot be used in a `style config 1765 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 1766 extent : anyOf(enum('min-max'), float) 1767 The extent of the whiskers. Available options include: 1768 1769 1770 * ``"min-max"`` : min and max are the lower and upper whiskers respectively. 1771 * A number representing multiple of the interquartile range. This number will be 1772 multiplied by the IQR to determine whisker boundary, which spans from the smallest 1773 data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where 1774 *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile 1775 range ( *Q3-Q1* ). 1776 1777 **Default value:** ``1.5``. 1778 median : anyOf(boolean, :class:`MarkConfig`) 1779 1780 opacity : float 1781 The opacity (value between [0,1]) of the mark. 1782 orient : :class:`Orientation` 1783 Orientation of the box plot. This is normally automatically determined based on 1784 types of fields on x and y channels. However, an explicit ``orient`` be specified 1785 when the orientation is ambiguous. 1786 1787 **Default value:** ``"vertical"``. 1788 outliers : anyOf(boolean, :class:`MarkConfig`) 1789 1790 rule : anyOf(boolean, :class:`MarkConfig`) 1791 1792 size : float 1793 Size of the box and median tick of a box plot 1794 ticks : anyOf(boolean, :class:`MarkConfig`) 1795 1796 """ 1797 _schema = {'$ref': '#/definitions/BoxPlotDef'} 1798 1799 def __init__(self, type=Undefined, box=Undefined, clip=Undefined, color=Undefined, extent=Undefined, 1800 median=Undefined, opacity=Undefined, orient=Undefined, outliers=Undefined, 1801 rule=Undefined, size=Undefined, ticks=Undefined, **kwds): 1802 super(BoxPlotDef, self).__init__(type=type, box=box, clip=clip, color=color, extent=extent, 1803 median=median, opacity=opacity, orient=orient, 1804 outliers=outliers, rule=rule, size=size, ticks=ticks, **kwds) 1805 1806 1807class CompositionConfig(VegaLiteSchema): 1808 """CompositionConfig schema wrapper 1809 1810 Mapping(required=[]) 1811 1812 Attributes 1813 ---------- 1814 1815 columns : float 1816 The number of columns to include in the view composition layout. 1817 1818 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 1819 will be assumed. This is equivalent to 1820 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 1821 ``repeat`` ). 1822 1823 **Note** : 1824 1825 1) This property is only for: 1826 1827 1828 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 1829 * the ``facet`` and ``repeat`` operator with one field/repetition definition 1830 (without row/column nesting) 1831 1832 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 1833 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 1834 spacing : float 1835 The default spacing in pixels between composed sub-views. 1836 1837 **Default value** : ``20`` 1838 """ 1839 _schema = {'$ref': '#/definitions/CompositionConfig'} 1840 1841 def __init__(self, columns=Undefined, spacing=Undefined, **kwds): 1842 super(CompositionConfig, self).__init__(columns=columns, spacing=spacing, **kwds) 1843 1844 1845class ConditionalMarkPropFieldDef(VegaLiteSchema): 1846 """ConditionalMarkPropFieldDef schema wrapper 1847 1848 anyOf(:class:`ConditionalPredicateMarkPropFieldDef`, 1849 :class:`ConditionalSelectionMarkPropFieldDef`) 1850 """ 1851 _schema = {'$ref': '#/definitions/ConditionalMarkPropFieldDef'} 1852 1853 def __init__(self, *args, **kwds): 1854 super(ConditionalMarkPropFieldDef, self).__init__(*args, **kwds) 1855 1856 1857class ConditionalMarkPropFieldDefTypeForShape(VegaLiteSchema): 1858 """ConditionalMarkPropFieldDefTypeForShape schema wrapper 1859 1860 anyOf(:class:`ConditionalPredicateMarkPropFieldDefTypeForShape`, 1861 :class:`ConditionalSelectionMarkPropFieldDefTypeForShape`) 1862 """ 1863 _schema = {'$ref': '#/definitions/ConditionalMarkPropFieldDef<TypeForShape>'} 1864 1865 def __init__(self, *args, **kwds): 1866 super(ConditionalMarkPropFieldDefTypeForShape, self).__init__(*args, **kwds) 1867 1868 1869class ConditionalNumberValueDef(VegaLiteSchema): 1870 """ConditionalNumberValueDef schema wrapper 1871 1872 anyOf(:class:`ConditionalPredicateNumberValueDef`, 1873 :class:`ConditionalSelectionNumberValueDef`) 1874 """ 1875 _schema = {'$ref': '#/definitions/ConditionalNumberValueDef'} 1876 1877 def __init__(self, *args, **kwds): 1878 super(ConditionalNumberValueDef, self).__init__(*args, **kwds) 1879 1880 1881class ConditionalPredicateMarkPropFieldDef(ConditionalMarkPropFieldDef): 1882 """ConditionalPredicateMarkPropFieldDef schema wrapper 1883 1884 Mapping(required=[test, type]) 1885 1886 Attributes 1887 ---------- 1888 1889 test : :class:`LogicalOperandPredicate` 1890 Predicate for triggering the condition 1891 type : :class:`StandardType` 1892 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 1893 ``"ordinal"``, or ``"nominal"`` ). 1894 It can also be a ``"geojson"`` type for encoding `'geoshape' 1895 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 1896 1897 **Note:** 1898 1899 1900 * Data values for a temporal field can be either a date-time string (e.g., 1901 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 1902 timestamp number (e.g., ``1552199579097`` ). 1903 * Data ``type`` describes the semantics of the data rather than the primitive data 1904 types ( ``number``, ``string``, etc.). The same primitive data type can have 1905 different types of measurement. For example, numeric data can represent 1906 quantitative, ordinal, or nominal data. 1907 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 1908 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 1909 or `"ordinal" (for using an ordinal bin scale) 1910 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 1911 * When using with `timeUnit 1912 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 1913 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 1914 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 1915 * When using with `aggregate 1916 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 1917 refers to the post-aggregation data type. For example, we can calculate count 1918 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 1919 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 1920 is ``"quantitative"``. 1921 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 1922 ``type`` as they have exactly the same type as their primary channels (e.g., 1923 ``x``, ``y`` ). 1924 1925 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 1926 documentation. 1927 aggregate : :class:`Aggregate` 1928 Aggregation function for the field 1929 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 1930 1931 **Default value:** ``undefined`` (None) 1932 1933 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 1934 documentation. 1935 bin : anyOf(boolean, :class:`BinParams`, None) 1936 A flag for binning a ``quantitative`` field, `an object defining binning parameters 1937 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 1938 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 1939 ``"binned"`` ). 1940 1941 1942 If ``true``, default `binning parameters 1943 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 1944 1945 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 1946 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 1947 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 1948 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 1949 set the axis's `tickMinStep 1950 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 1951 1952 **Default value:** ``false`` 1953 1954 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 1955 documentation. 1956 field : :class:`Field` 1957 **Required.** A string defining the name of the field from which to pull a data 1958 value 1959 or an object defining iterated values from the `repeat 1960 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 1961 1962 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 1963 documentation. 1964 1965 **Notes:** 1966 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 1967 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 1968 If field names contain dots or brackets but are not nested, you can use ``\\`` to 1969 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 1970 See more details about escaping in the `field documentation 1971 <https://vega.github.io/vega-lite/docs/field.html>`__. 1972 2) ``field`` is not required if ``aggregate`` is ``count``. 1973 legend : anyOf(:class:`Legend`, None) 1974 An object defining properties of the legend. 1975 If ``null``, the legend for the encoding channel will be removed. 1976 1977 **Default value:** If undefined, default `legend properties 1978 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 1979 1980 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 1981 documentation. 1982 scale : anyOf(:class:`Scale`, None) 1983 An object defining properties of the channel's scale, which is the function that 1984 transforms values in the data domain (numbers, dates, strings, etc) to visual values 1985 (pixels, colors, sizes) of the encoding channels. 1986 1987 If ``null``, the scale will be `disabled and the data value will be directly encoded 1988 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 1989 1990 **Default value:** If undefined, default `scale properties 1991 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 1992 1993 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 1994 documentation. 1995 sort : :class:`Sort` 1996 Sort order for the encoded field. 1997 1998 For continuous fields (quantitative or temporal), ``sort`` can be either 1999 ``"ascending"`` or ``"descending"``. 2000 2001 For discrete fields, ``sort`` can be one of the following: 2002 2003 2004 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 2005 Javascript. 2006 * `A sort-by-encoding definition 2007 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 2008 by another encoding channel. (This type of sort definition is not available for 2009 ``row`` and ``column`` channels.) 2010 * `A sort field definition 2011 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 2012 another field. 2013 * `An array specifying the field values in preferred order 2014 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 2015 sort order will obey the values in the array, followed by any unspecified values 2016 in their original order. For discrete time field, values in the sort array can be 2017 `date-time definition objects <types#datetime>`__. In addition, for time units 2018 ``"month"`` and ``"day"``, the values can be the month or day names (case 2019 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 2020 * ``null`` indicating no sort. 2021 2022 **Default value:** ``"ascending"`` 2023 2024 **Note:** ``null`` is not supported for ``row`` and ``column``. 2025 2026 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 2027 documentation. 2028 timeUnit : :class:`TimeUnit` 2029 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 2030 field. 2031 or `a temporal field that gets casted as ordinal 2032 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 2033 2034 **Default value:** ``undefined`` (None) 2035 2036 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 2037 documentation. 2038 title : anyOf(string, None) 2039 A title for the field. If ``null``, the title will be removed. 2040 2041 **Default value:** derived from the field's name and transformation function ( 2042 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 2043 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 2044 field is binned or has a time unit applied, the applied function is shown in 2045 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 2046 Otherwise, the title is simply the field name. 2047 2048 **Notes** : 2049 2050 1) You can customize the default field title format by providing the `fieldTitle 2051 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 2052 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 2053 function via the compile function's options 2054 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 2055 2056 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 2057 defined, axis/header/legend title will be used. 2058 """ 2059 _schema = {'$ref': '#/definitions/ConditionalPredicate<MarkPropFieldDef>'} 2060 2061 def __init__(self, test=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined, 2062 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 2063 title=Undefined, **kwds): 2064 super(ConditionalPredicateMarkPropFieldDef, self).__init__(test=test, type=type, 2065 aggregate=aggregate, bin=bin, 2066 field=field, legend=legend, 2067 scale=scale, sort=sort, 2068 timeUnit=timeUnit, title=title, 2069 **kwds) 2070 2071 2072class ConditionalPredicateMarkPropFieldDefTypeForShape(ConditionalMarkPropFieldDefTypeForShape): 2073 """ConditionalPredicateMarkPropFieldDefTypeForShape schema wrapper 2074 2075 Mapping(required=[test, type]) 2076 2077 Attributes 2078 ---------- 2079 2080 test : :class:`LogicalOperandPredicate` 2081 Predicate for triggering the condition 2082 type : :class:`TypeForShape` 2083 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 2084 ``"ordinal"``, or ``"nominal"`` ). 2085 It can also be a ``"geojson"`` type for encoding `'geoshape' 2086 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 2087 2088 **Note:** 2089 2090 2091 * Data values for a temporal field can be either a date-time string (e.g., 2092 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 2093 timestamp number (e.g., ``1552199579097`` ). 2094 * Data ``type`` describes the semantics of the data rather than the primitive data 2095 types ( ``number``, ``string``, etc.). The same primitive data type can have 2096 different types of measurement. For example, numeric data can represent 2097 quantitative, ordinal, or nominal data. 2098 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 2099 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 2100 or `"ordinal" (for using an ordinal bin scale) 2101 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2102 * When using with `timeUnit 2103 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 2104 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 2105 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2106 * When using with `aggregate 2107 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 2108 refers to the post-aggregation data type. For example, we can calculate count 2109 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 2110 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 2111 is ``"quantitative"``. 2112 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 2113 ``type`` as they have exactly the same type as their primary channels (e.g., 2114 ``x``, ``y`` ). 2115 2116 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 2117 documentation. 2118 aggregate : :class:`Aggregate` 2119 Aggregation function for the field 2120 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 2121 2122 **Default value:** ``undefined`` (None) 2123 2124 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 2125 documentation. 2126 bin : anyOf(boolean, :class:`BinParams`, None) 2127 A flag for binning a ``quantitative`` field, `an object defining binning parameters 2128 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 2129 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 2130 ``"binned"`` ). 2131 2132 2133 If ``true``, default `binning parameters 2134 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 2135 2136 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 2137 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 2138 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 2139 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 2140 set the axis's `tickMinStep 2141 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 2142 2143 **Default value:** ``false`` 2144 2145 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 2146 documentation. 2147 field : :class:`Field` 2148 **Required.** A string defining the name of the field from which to pull a data 2149 value 2150 or an object defining iterated values from the `repeat 2151 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 2152 2153 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 2154 documentation. 2155 2156 **Notes:** 2157 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 2158 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 2159 If field names contain dots or brackets but are not nested, you can use ``\\`` to 2160 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 2161 See more details about escaping in the `field documentation 2162 <https://vega.github.io/vega-lite/docs/field.html>`__. 2163 2) ``field`` is not required if ``aggregate`` is ``count``. 2164 legend : anyOf(:class:`Legend`, None) 2165 An object defining properties of the legend. 2166 If ``null``, the legend for the encoding channel will be removed. 2167 2168 **Default value:** If undefined, default `legend properties 2169 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 2170 2171 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 2172 documentation. 2173 scale : anyOf(:class:`Scale`, None) 2174 An object defining properties of the channel's scale, which is the function that 2175 transforms values in the data domain (numbers, dates, strings, etc) to visual values 2176 (pixels, colors, sizes) of the encoding channels. 2177 2178 If ``null``, the scale will be `disabled and the data value will be directly encoded 2179 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 2180 2181 **Default value:** If undefined, default `scale properties 2182 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 2183 2184 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 2185 documentation. 2186 sort : :class:`Sort` 2187 Sort order for the encoded field. 2188 2189 For continuous fields (quantitative or temporal), ``sort`` can be either 2190 ``"ascending"`` or ``"descending"``. 2191 2192 For discrete fields, ``sort`` can be one of the following: 2193 2194 2195 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 2196 Javascript. 2197 * `A sort-by-encoding definition 2198 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 2199 by another encoding channel. (This type of sort definition is not available for 2200 ``row`` and ``column`` channels.) 2201 * `A sort field definition 2202 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 2203 another field. 2204 * `An array specifying the field values in preferred order 2205 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 2206 sort order will obey the values in the array, followed by any unspecified values 2207 in their original order. For discrete time field, values in the sort array can be 2208 `date-time definition objects <types#datetime>`__. In addition, for time units 2209 ``"month"`` and ``"day"``, the values can be the month or day names (case 2210 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 2211 * ``null`` indicating no sort. 2212 2213 **Default value:** ``"ascending"`` 2214 2215 **Note:** ``null`` is not supported for ``row`` and ``column``. 2216 2217 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 2218 documentation. 2219 timeUnit : :class:`TimeUnit` 2220 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 2221 field. 2222 or `a temporal field that gets casted as ordinal 2223 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 2224 2225 **Default value:** ``undefined`` (None) 2226 2227 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 2228 documentation. 2229 title : anyOf(string, None) 2230 A title for the field. If ``null``, the title will be removed. 2231 2232 **Default value:** derived from the field's name and transformation function ( 2233 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 2234 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 2235 field is binned or has a time unit applied, the applied function is shown in 2236 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 2237 Otherwise, the title is simply the field name. 2238 2239 **Notes** : 2240 2241 1) You can customize the default field title format by providing the `fieldTitle 2242 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 2243 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 2244 function via the compile function's options 2245 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 2246 2247 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 2248 defined, axis/header/legend title will be used. 2249 """ 2250 _schema = {'$ref': '#/definitions/ConditionalPredicate<MarkPropFieldDef<TypeForShape>>'} 2251 2252 def __init__(self, test=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined, 2253 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 2254 title=Undefined, **kwds): 2255 super(ConditionalPredicateMarkPropFieldDefTypeForShape, self).__init__(test=test, type=type, 2256 aggregate=aggregate, 2257 bin=bin, field=field, 2258 legend=legend, 2259 scale=scale, sort=sort, 2260 timeUnit=timeUnit, 2261 title=title, **kwds) 2262 2263 2264class ConditionalPredicateNumberValueDef(ConditionalNumberValueDef): 2265 """ConditionalPredicateNumberValueDef schema wrapper 2266 2267 Mapping(required=[test, value]) 2268 2269 Attributes 2270 ---------- 2271 2272 test : :class:`LogicalOperandPredicate` 2273 Predicate for triggering the condition 2274 value : float 2275 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 2276 between ``0`` to ``1`` for opacity). 2277 """ 2278 _schema = {'$ref': '#/definitions/ConditionalPredicate<NumberValueDef>'} 2279 2280 def __init__(self, test=Undefined, value=Undefined, **kwds): 2281 super(ConditionalPredicateNumberValueDef, self).__init__(test=test, value=value, **kwds) 2282 2283 2284class ConditionalSelectionMarkPropFieldDef(ConditionalMarkPropFieldDef): 2285 """ConditionalSelectionMarkPropFieldDef schema wrapper 2286 2287 Mapping(required=[selection, type]) 2288 2289 Attributes 2290 ---------- 2291 2292 selection : :class:`SelectionOperand` 2293 A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a 2294 series of `composed selections 2295 <https://vega.github.io/vega-lite/docs/selection.html#compose>`__. 2296 type : :class:`StandardType` 2297 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 2298 ``"ordinal"``, or ``"nominal"`` ). 2299 It can also be a ``"geojson"`` type for encoding `'geoshape' 2300 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 2301 2302 **Note:** 2303 2304 2305 * Data values for a temporal field can be either a date-time string (e.g., 2306 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 2307 timestamp number (e.g., ``1552199579097`` ). 2308 * Data ``type`` describes the semantics of the data rather than the primitive data 2309 types ( ``number``, ``string``, etc.). The same primitive data type can have 2310 different types of measurement. For example, numeric data can represent 2311 quantitative, ordinal, or nominal data. 2312 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 2313 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 2314 or `"ordinal" (for using an ordinal bin scale) 2315 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2316 * When using with `timeUnit 2317 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 2318 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 2319 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2320 * When using with `aggregate 2321 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 2322 refers to the post-aggregation data type. For example, we can calculate count 2323 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 2324 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 2325 is ``"quantitative"``. 2326 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 2327 ``type`` as they have exactly the same type as their primary channels (e.g., 2328 ``x``, ``y`` ). 2329 2330 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 2331 documentation. 2332 aggregate : :class:`Aggregate` 2333 Aggregation function for the field 2334 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 2335 2336 **Default value:** ``undefined`` (None) 2337 2338 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 2339 documentation. 2340 bin : anyOf(boolean, :class:`BinParams`, None) 2341 A flag for binning a ``quantitative`` field, `an object defining binning parameters 2342 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 2343 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 2344 ``"binned"`` ). 2345 2346 2347 If ``true``, default `binning parameters 2348 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 2349 2350 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 2351 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 2352 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 2353 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 2354 set the axis's `tickMinStep 2355 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 2356 2357 **Default value:** ``false`` 2358 2359 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 2360 documentation. 2361 field : :class:`Field` 2362 **Required.** A string defining the name of the field from which to pull a data 2363 value 2364 or an object defining iterated values from the `repeat 2365 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 2366 2367 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 2368 documentation. 2369 2370 **Notes:** 2371 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 2372 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 2373 If field names contain dots or brackets but are not nested, you can use ``\\`` to 2374 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 2375 See more details about escaping in the `field documentation 2376 <https://vega.github.io/vega-lite/docs/field.html>`__. 2377 2) ``field`` is not required if ``aggregate`` is ``count``. 2378 legend : anyOf(:class:`Legend`, None) 2379 An object defining properties of the legend. 2380 If ``null``, the legend for the encoding channel will be removed. 2381 2382 **Default value:** If undefined, default `legend properties 2383 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 2384 2385 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 2386 documentation. 2387 scale : anyOf(:class:`Scale`, None) 2388 An object defining properties of the channel's scale, which is the function that 2389 transforms values in the data domain (numbers, dates, strings, etc) to visual values 2390 (pixels, colors, sizes) of the encoding channels. 2391 2392 If ``null``, the scale will be `disabled and the data value will be directly encoded 2393 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 2394 2395 **Default value:** If undefined, default `scale properties 2396 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 2397 2398 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 2399 documentation. 2400 sort : :class:`Sort` 2401 Sort order for the encoded field. 2402 2403 For continuous fields (quantitative or temporal), ``sort`` can be either 2404 ``"ascending"`` or ``"descending"``. 2405 2406 For discrete fields, ``sort`` can be one of the following: 2407 2408 2409 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 2410 Javascript. 2411 * `A sort-by-encoding definition 2412 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 2413 by another encoding channel. (This type of sort definition is not available for 2414 ``row`` and ``column`` channels.) 2415 * `A sort field definition 2416 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 2417 another field. 2418 * `An array specifying the field values in preferred order 2419 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 2420 sort order will obey the values in the array, followed by any unspecified values 2421 in their original order. For discrete time field, values in the sort array can be 2422 `date-time definition objects <types#datetime>`__. In addition, for time units 2423 ``"month"`` and ``"day"``, the values can be the month or day names (case 2424 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 2425 * ``null`` indicating no sort. 2426 2427 **Default value:** ``"ascending"`` 2428 2429 **Note:** ``null`` is not supported for ``row`` and ``column``. 2430 2431 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 2432 documentation. 2433 timeUnit : :class:`TimeUnit` 2434 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 2435 field. 2436 or `a temporal field that gets casted as ordinal 2437 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 2438 2439 **Default value:** ``undefined`` (None) 2440 2441 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 2442 documentation. 2443 title : anyOf(string, None) 2444 A title for the field. If ``null``, the title will be removed. 2445 2446 **Default value:** derived from the field's name and transformation function ( 2447 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 2448 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 2449 field is binned or has a time unit applied, the applied function is shown in 2450 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 2451 Otherwise, the title is simply the field name. 2452 2453 **Notes** : 2454 2455 1) You can customize the default field title format by providing the `fieldTitle 2456 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 2457 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 2458 function via the compile function's options 2459 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 2460 2461 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 2462 defined, axis/header/legend title will be used. 2463 """ 2464 _schema = {'$ref': '#/definitions/ConditionalSelection<MarkPropFieldDef>'} 2465 2466 def __init__(self, selection=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined, 2467 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 2468 title=Undefined, **kwds): 2469 super(ConditionalSelectionMarkPropFieldDef, self).__init__(selection=selection, type=type, 2470 aggregate=aggregate, bin=bin, 2471 field=field, legend=legend, 2472 scale=scale, sort=sort, 2473 timeUnit=timeUnit, title=title, 2474 **kwds) 2475 2476 2477class ConditionalSelectionMarkPropFieldDefTypeForShape(ConditionalMarkPropFieldDefTypeForShape): 2478 """ConditionalSelectionMarkPropFieldDefTypeForShape schema wrapper 2479 2480 Mapping(required=[selection, type]) 2481 2482 Attributes 2483 ---------- 2484 2485 selection : :class:`SelectionOperand` 2486 A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a 2487 series of `composed selections 2488 <https://vega.github.io/vega-lite/docs/selection.html#compose>`__. 2489 type : :class:`TypeForShape` 2490 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 2491 ``"ordinal"``, or ``"nominal"`` ). 2492 It can also be a ``"geojson"`` type for encoding `'geoshape' 2493 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 2494 2495 **Note:** 2496 2497 2498 * Data values for a temporal field can be either a date-time string (e.g., 2499 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 2500 timestamp number (e.g., ``1552199579097`` ). 2501 * Data ``type`` describes the semantics of the data rather than the primitive data 2502 types ( ``number``, ``string``, etc.). The same primitive data type can have 2503 different types of measurement. For example, numeric data can represent 2504 quantitative, ordinal, or nominal data. 2505 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 2506 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 2507 or `"ordinal" (for using an ordinal bin scale) 2508 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2509 * When using with `timeUnit 2510 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 2511 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 2512 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2513 * When using with `aggregate 2514 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 2515 refers to the post-aggregation data type. For example, we can calculate count 2516 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 2517 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 2518 is ``"quantitative"``. 2519 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 2520 ``type`` as they have exactly the same type as their primary channels (e.g., 2521 ``x``, ``y`` ). 2522 2523 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 2524 documentation. 2525 aggregate : :class:`Aggregate` 2526 Aggregation function for the field 2527 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 2528 2529 **Default value:** ``undefined`` (None) 2530 2531 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 2532 documentation. 2533 bin : anyOf(boolean, :class:`BinParams`, None) 2534 A flag for binning a ``quantitative`` field, `an object defining binning parameters 2535 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 2536 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 2537 ``"binned"`` ). 2538 2539 2540 If ``true``, default `binning parameters 2541 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 2542 2543 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 2544 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 2545 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 2546 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 2547 set the axis's `tickMinStep 2548 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 2549 2550 **Default value:** ``false`` 2551 2552 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 2553 documentation. 2554 field : :class:`Field` 2555 **Required.** A string defining the name of the field from which to pull a data 2556 value 2557 or an object defining iterated values from the `repeat 2558 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 2559 2560 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 2561 documentation. 2562 2563 **Notes:** 2564 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 2565 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 2566 If field names contain dots or brackets but are not nested, you can use ``\\`` to 2567 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 2568 See more details about escaping in the `field documentation 2569 <https://vega.github.io/vega-lite/docs/field.html>`__. 2570 2) ``field`` is not required if ``aggregate`` is ``count``. 2571 legend : anyOf(:class:`Legend`, None) 2572 An object defining properties of the legend. 2573 If ``null``, the legend for the encoding channel will be removed. 2574 2575 **Default value:** If undefined, default `legend properties 2576 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 2577 2578 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 2579 documentation. 2580 scale : anyOf(:class:`Scale`, None) 2581 An object defining properties of the channel's scale, which is the function that 2582 transforms values in the data domain (numbers, dates, strings, etc) to visual values 2583 (pixels, colors, sizes) of the encoding channels. 2584 2585 If ``null``, the scale will be `disabled and the data value will be directly encoded 2586 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 2587 2588 **Default value:** If undefined, default `scale properties 2589 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 2590 2591 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 2592 documentation. 2593 sort : :class:`Sort` 2594 Sort order for the encoded field. 2595 2596 For continuous fields (quantitative or temporal), ``sort`` can be either 2597 ``"ascending"`` or ``"descending"``. 2598 2599 For discrete fields, ``sort`` can be one of the following: 2600 2601 2602 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 2603 Javascript. 2604 * `A sort-by-encoding definition 2605 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 2606 by another encoding channel. (This type of sort definition is not available for 2607 ``row`` and ``column`` channels.) 2608 * `A sort field definition 2609 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 2610 another field. 2611 * `An array specifying the field values in preferred order 2612 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 2613 sort order will obey the values in the array, followed by any unspecified values 2614 in their original order. For discrete time field, values in the sort array can be 2615 `date-time definition objects <types#datetime>`__. In addition, for time units 2616 ``"month"`` and ``"day"``, the values can be the month or day names (case 2617 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 2618 * ``null`` indicating no sort. 2619 2620 **Default value:** ``"ascending"`` 2621 2622 **Note:** ``null`` is not supported for ``row`` and ``column``. 2623 2624 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 2625 documentation. 2626 timeUnit : :class:`TimeUnit` 2627 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 2628 field. 2629 or `a temporal field that gets casted as ordinal 2630 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 2631 2632 **Default value:** ``undefined`` (None) 2633 2634 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 2635 documentation. 2636 title : anyOf(string, None) 2637 A title for the field. If ``null``, the title will be removed. 2638 2639 **Default value:** derived from the field's name and transformation function ( 2640 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 2641 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 2642 field is binned or has a time unit applied, the applied function is shown in 2643 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 2644 Otherwise, the title is simply the field name. 2645 2646 **Notes** : 2647 2648 1) You can customize the default field title format by providing the `fieldTitle 2649 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 2650 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 2651 function via the compile function's options 2652 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 2653 2654 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 2655 defined, axis/header/legend title will be used. 2656 """ 2657 _schema = {'$ref': '#/definitions/ConditionalSelection<MarkPropFieldDef<TypeForShape>>'} 2658 2659 def __init__(self, selection=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined, 2660 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 2661 title=Undefined, **kwds): 2662 super(ConditionalSelectionMarkPropFieldDefTypeForShape, self).__init__(selection=selection, 2663 type=type, 2664 aggregate=aggregate, 2665 bin=bin, field=field, 2666 legend=legend, 2667 scale=scale, sort=sort, 2668 timeUnit=timeUnit, 2669 title=title, **kwds) 2670 2671 2672class ConditionalSelectionNumberValueDef(ConditionalNumberValueDef): 2673 """ConditionalSelectionNumberValueDef schema wrapper 2674 2675 Mapping(required=[selection, value]) 2676 2677 Attributes 2678 ---------- 2679 2680 selection : :class:`SelectionOperand` 2681 A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a 2682 series of `composed selections 2683 <https://vega.github.io/vega-lite/docs/selection.html#compose>`__. 2684 value : float 2685 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 2686 between ``0`` to ``1`` for opacity). 2687 """ 2688 _schema = {'$ref': '#/definitions/ConditionalSelection<NumberValueDef>'} 2689 2690 def __init__(self, selection=Undefined, value=Undefined, **kwds): 2691 super(ConditionalSelectionNumberValueDef, self).__init__(selection=selection, value=value, 2692 **kwds) 2693 2694 2695class ConditionalStringValueDef(VegaLiteSchema): 2696 """ConditionalStringValueDef schema wrapper 2697 2698 anyOf(:class:`ConditionalPredicateStringValueDef`, 2699 :class:`ConditionalSelectionStringValueDef`) 2700 """ 2701 _schema = {'$ref': '#/definitions/ConditionalStringValueDef'} 2702 2703 def __init__(self, *args, **kwds): 2704 super(ConditionalStringValueDef, self).__init__(*args, **kwds) 2705 2706 2707class ConditionalPredicateStringValueDef(ConditionalStringValueDef): 2708 """ConditionalPredicateStringValueDef schema wrapper 2709 2710 Mapping(required=[test, value]) 2711 2712 Attributes 2713 ---------- 2714 2715 test : :class:`LogicalOperandPredicate` 2716 Predicate for triggering the condition 2717 value : anyOf(string, None) 2718 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 2719 between ``0`` to ``1`` for opacity). 2720 """ 2721 _schema = {'$ref': '#/definitions/ConditionalPredicate<StringValueDef>'} 2722 2723 def __init__(self, test=Undefined, value=Undefined, **kwds): 2724 super(ConditionalPredicateStringValueDef, self).__init__(test=test, value=value, **kwds) 2725 2726 2727class ConditionalSelectionStringValueDef(ConditionalStringValueDef): 2728 """ConditionalSelectionStringValueDef schema wrapper 2729 2730 Mapping(required=[selection, value]) 2731 2732 Attributes 2733 ---------- 2734 2735 selection : :class:`SelectionOperand` 2736 A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a 2737 series of `composed selections 2738 <https://vega.github.io/vega-lite/docs/selection.html#compose>`__. 2739 value : anyOf(string, None) 2740 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 2741 between ``0`` to ``1`` for opacity). 2742 """ 2743 _schema = {'$ref': '#/definitions/ConditionalSelection<StringValueDef>'} 2744 2745 def __init__(self, selection=Undefined, value=Undefined, **kwds): 2746 super(ConditionalSelectionStringValueDef, self).__init__(selection=selection, value=value, 2747 **kwds) 2748 2749 2750class ConditionalTextFieldDef(VegaLiteSchema): 2751 """ConditionalTextFieldDef schema wrapper 2752 2753 anyOf(:class:`ConditionalPredicateTextFieldDef`, :class:`ConditionalSelectionTextFieldDef`) 2754 """ 2755 _schema = {'$ref': '#/definitions/ConditionalTextFieldDef'} 2756 2757 def __init__(self, *args, **kwds): 2758 super(ConditionalTextFieldDef, self).__init__(*args, **kwds) 2759 2760 2761class ConditionalPredicateTextFieldDef(ConditionalTextFieldDef): 2762 """ConditionalPredicateTextFieldDef schema wrapper 2763 2764 Mapping(required=[test, type]) 2765 2766 Attributes 2767 ---------- 2768 2769 test : :class:`LogicalOperandPredicate` 2770 Predicate for triggering the condition 2771 type : :class:`StandardType` 2772 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 2773 ``"ordinal"``, or ``"nominal"`` ). 2774 It can also be a ``"geojson"`` type for encoding `'geoshape' 2775 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 2776 2777 **Note:** 2778 2779 2780 * Data values for a temporal field can be either a date-time string (e.g., 2781 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 2782 timestamp number (e.g., ``1552199579097`` ). 2783 * Data ``type`` describes the semantics of the data rather than the primitive data 2784 types ( ``number``, ``string``, etc.). The same primitive data type can have 2785 different types of measurement. For example, numeric data can represent 2786 quantitative, ordinal, or nominal data. 2787 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 2788 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 2789 or `"ordinal" (for using an ordinal bin scale) 2790 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2791 * When using with `timeUnit 2792 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 2793 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 2794 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2795 * When using with `aggregate 2796 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 2797 refers to the post-aggregation data type. For example, we can calculate count 2798 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 2799 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 2800 is ``"quantitative"``. 2801 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 2802 ``type`` as they have exactly the same type as their primary channels (e.g., 2803 ``x``, ``y`` ). 2804 2805 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 2806 documentation. 2807 aggregate : :class:`Aggregate` 2808 Aggregation function for the field 2809 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 2810 2811 **Default value:** ``undefined`` (None) 2812 2813 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 2814 documentation. 2815 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 2816 A flag for binning a ``quantitative`` field, `an object defining binning parameters 2817 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 2818 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 2819 ``"binned"`` ). 2820 2821 2822 If ``true``, default `binning parameters 2823 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 2824 2825 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 2826 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 2827 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 2828 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 2829 set the axis's `tickMinStep 2830 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 2831 2832 **Default value:** ``false`` 2833 2834 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 2835 documentation. 2836 field : :class:`Field` 2837 **Required.** A string defining the name of the field from which to pull a data 2838 value 2839 or an object defining iterated values from the `repeat 2840 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 2841 2842 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 2843 documentation. 2844 2845 **Notes:** 2846 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 2847 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 2848 If field names contain dots or brackets but are not nested, you can use ``\\`` to 2849 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 2850 See more details about escaping in the `field documentation 2851 <https://vega.github.io/vega-lite/docs/field.html>`__. 2852 2) ``field`` is not required if ``aggregate`` is ``count``. 2853 format : string 2854 The text formatting pattern for labels of guides (axes, legends, headers) and text 2855 marks. 2856 2857 2858 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 2859 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 2860 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 2861 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 2862 2863 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 2864 for more examples. 2865 2866 **Default value:** Derived from `numberFormat 2867 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 2868 format and from `timeFormat 2869 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 2870 format. 2871 formatType : enum('number', 'time') 2872 The format type for labels ( ``"number"`` or ``"time"`` ). 2873 2874 **Default value:** 2875 2876 2877 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 2878 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 2879 ``timeUnit``. 2880 timeUnit : :class:`TimeUnit` 2881 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 2882 field. 2883 or `a temporal field that gets casted as ordinal 2884 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 2885 2886 **Default value:** ``undefined`` (None) 2887 2888 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 2889 documentation. 2890 title : anyOf(string, None) 2891 A title for the field. If ``null``, the title will be removed. 2892 2893 **Default value:** derived from the field's name and transformation function ( 2894 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 2895 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 2896 field is binned or has a time unit applied, the applied function is shown in 2897 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 2898 Otherwise, the title is simply the field name. 2899 2900 **Notes** : 2901 2902 1) You can customize the default field title format by providing the `fieldTitle 2903 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 2904 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 2905 function via the compile function's options 2906 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 2907 2908 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 2909 defined, axis/header/legend title will be used. 2910 """ 2911 _schema = {'$ref': '#/definitions/ConditionalPredicate<TextFieldDef>'} 2912 2913 def __init__(self, test=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined, 2914 field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined, 2915 title=Undefined, **kwds): 2916 super(ConditionalPredicateTextFieldDef, self).__init__(test=test, type=type, 2917 aggregate=aggregate, bin=bin, 2918 field=field, format=format, 2919 formatType=formatType, timeUnit=timeUnit, 2920 title=title, **kwds) 2921 2922 2923class ConditionalSelectionTextFieldDef(ConditionalTextFieldDef): 2924 """ConditionalSelectionTextFieldDef schema wrapper 2925 2926 Mapping(required=[selection, type]) 2927 2928 Attributes 2929 ---------- 2930 2931 selection : :class:`SelectionOperand` 2932 A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a 2933 series of `composed selections 2934 <https://vega.github.io/vega-lite/docs/selection.html#compose>`__. 2935 type : :class:`StandardType` 2936 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 2937 ``"ordinal"``, or ``"nominal"`` ). 2938 It can also be a ``"geojson"`` type for encoding `'geoshape' 2939 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 2940 2941 **Note:** 2942 2943 2944 * Data values for a temporal field can be either a date-time string (e.g., 2945 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 2946 timestamp number (e.g., ``1552199579097`` ). 2947 * Data ``type`` describes the semantics of the data rather than the primitive data 2948 types ( ``number``, ``string``, etc.). The same primitive data type can have 2949 different types of measurement. For example, numeric data can represent 2950 quantitative, ordinal, or nominal data. 2951 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 2952 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 2953 or `"ordinal" (for using an ordinal bin scale) 2954 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2955 * When using with `timeUnit 2956 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 2957 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 2958 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 2959 * When using with `aggregate 2960 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 2961 refers to the post-aggregation data type. For example, we can calculate count 2962 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 2963 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 2964 is ``"quantitative"``. 2965 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 2966 ``type`` as they have exactly the same type as their primary channels (e.g., 2967 ``x``, ``y`` ). 2968 2969 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 2970 documentation. 2971 aggregate : :class:`Aggregate` 2972 Aggregation function for the field 2973 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 2974 2975 **Default value:** ``undefined`` (None) 2976 2977 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 2978 documentation. 2979 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 2980 A flag for binning a ``quantitative`` field, `an object defining binning parameters 2981 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 2982 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 2983 ``"binned"`` ). 2984 2985 2986 If ``true``, default `binning parameters 2987 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 2988 2989 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 2990 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 2991 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 2992 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 2993 set the axis's `tickMinStep 2994 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 2995 2996 **Default value:** ``false`` 2997 2998 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 2999 documentation. 3000 field : :class:`Field` 3001 **Required.** A string defining the name of the field from which to pull a data 3002 value 3003 or an object defining iterated values from the `repeat 3004 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 3005 3006 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 3007 documentation. 3008 3009 **Notes:** 3010 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 3011 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 3012 If field names contain dots or brackets but are not nested, you can use ``\\`` to 3013 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 3014 See more details about escaping in the `field documentation 3015 <https://vega.github.io/vega-lite/docs/field.html>`__. 3016 2) ``field`` is not required if ``aggregate`` is ``count``. 3017 format : string 3018 The text formatting pattern for labels of guides (axes, legends, headers) and text 3019 marks. 3020 3021 3022 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 3023 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 3024 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 3025 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 3026 3027 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 3028 for more examples. 3029 3030 **Default value:** Derived from `numberFormat 3031 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 3032 format and from `timeFormat 3033 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 3034 format. 3035 formatType : enum('number', 'time') 3036 The format type for labels ( ``"number"`` or ``"time"`` ). 3037 3038 **Default value:** 3039 3040 3041 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 3042 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 3043 ``timeUnit``. 3044 timeUnit : :class:`TimeUnit` 3045 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 3046 field. 3047 or `a temporal field that gets casted as ordinal 3048 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 3049 3050 **Default value:** ``undefined`` (None) 3051 3052 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 3053 documentation. 3054 title : anyOf(string, None) 3055 A title for the field. If ``null``, the title will be removed. 3056 3057 **Default value:** derived from the field's name and transformation function ( 3058 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 3059 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 3060 field is binned or has a time unit applied, the applied function is shown in 3061 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 3062 Otherwise, the title is simply the field name. 3063 3064 **Notes** : 3065 3066 1) You can customize the default field title format by providing the `fieldTitle 3067 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 3068 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 3069 function via the compile function's options 3070 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 3071 3072 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 3073 defined, axis/header/legend title will be used. 3074 """ 3075 _schema = {'$ref': '#/definitions/ConditionalSelection<TextFieldDef>'} 3076 3077 def __init__(self, selection=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined, 3078 field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined, 3079 title=Undefined, **kwds): 3080 super(ConditionalSelectionTextFieldDef, self).__init__(selection=selection, type=type, 3081 aggregate=aggregate, bin=bin, 3082 field=field, format=format, 3083 formatType=formatType, timeUnit=timeUnit, 3084 title=title, **kwds) 3085 3086 3087class ConditionalValueDef(VegaLiteSchema): 3088 """ConditionalValueDef schema wrapper 3089 3090 anyOf(:class:`ConditionalPredicateValueDef`, :class:`ConditionalSelectionValueDef`) 3091 """ 3092 _schema = {'$ref': '#/definitions/ConditionalValueDef'} 3093 3094 def __init__(self, *args, **kwds): 3095 super(ConditionalValueDef, self).__init__(*args, **kwds) 3096 3097 3098class ConditionalPredicateValueDef(ConditionalValueDef): 3099 """ConditionalPredicateValueDef schema wrapper 3100 3101 Mapping(required=[test, value]) 3102 3103 Attributes 3104 ---------- 3105 3106 test : :class:`LogicalOperandPredicate` 3107 Predicate for triggering the condition 3108 value : :class:`Value` 3109 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 3110 between ``0`` to ``1`` for opacity). 3111 """ 3112 _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef>'} 3113 3114 def __init__(self, test=Undefined, value=Undefined, **kwds): 3115 super(ConditionalPredicateValueDef, self).__init__(test=test, value=value, **kwds) 3116 3117 3118class ConditionalSelectionValueDef(ConditionalValueDef): 3119 """ConditionalSelectionValueDef schema wrapper 3120 3121 Mapping(required=[selection, value]) 3122 3123 Attributes 3124 ---------- 3125 3126 selection : :class:`SelectionOperand` 3127 A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a 3128 series of `composed selections 3129 <https://vega.github.io/vega-lite/docs/selection.html#compose>`__. 3130 value : :class:`Value` 3131 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 3132 between ``0`` to ``1`` for opacity). 3133 """ 3134 _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef>'} 3135 3136 def __init__(self, selection=Undefined, value=Undefined, **kwds): 3137 super(ConditionalSelectionValueDef, self).__init__(selection=selection, value=value, **kwds) 3138 3139 3140class Config(VegaLiteSchema): 3141 """Config schema wrapper 3142 3143 Mapping(required=[]) 3144 3145 Attributes 3146 ---------- 3147 3148 area : :class:`AreaConfig` 3149 Area-Specific Config 3150 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 3151 Sets how the visualization size should be determined. If a string, should be one of 3152 ``"pad"``, ``"fit"`` or ``"none"``. 3153 Object values can additionally specify parameters for content sizing and automatic 3154 resizing. 3155 ``"fit"`` is only supported for single and layered views that don't use 3156 ``rangeStep``. 3157 3158 **Default value** : ``pad`` 3159 axis : :class:`AxisConfig` 3160 Axis configuration, which determines default properties for all ``x`` and ``y`` 3161 `axes <https://vega.github.io/vega-lite/docs/axis.html>`__. For a full list of axis 3162 configuration options, please see the `corresponding section of the axis 3163 documentation <https://vega.github.io/vega-lite/docs/axis.html#config>`__. 3164 axisBand : :class:`AxisConfig` 3165 Specific axis config for axes with "band" scales. 3166 axisBottom : :class:`AxisConfig` 3167 Specific axis config for x-axis along the bottom edge of the chart. 3168 axisLeft : :class:`AxisConfig` 3169 Specific axis config for y-axis along the left edge of the chart. 3170 axisRight : :class:`AxisConfig` 3171 Specific axis config for y-axis along the right edge of the chart. 3172 axisTop : :class:`AxisConfig` 3173 Specific axis config for x-axis along the top edge of the chart. 3174 axisX : :class:`AxisConfig` 3175 X-axis specific config. 3176 axisY : :class:`AxisConfig` 3177 Y-axis specific config. 3178 background : string 3179 CSS color property to use as the background of the whole Vega-Lite view 3180 3181 **Default value:** none (transparent) 3182 bar : :class:`RectConfig` 3183 Bar-Specific Config 3184 boxplot : :class:`BoxPlotConfig` 3185 Box Config 3186 circle : :class:`MarkConfig` 3187 Circle-Specific Config 3188 concat : :class:`CompositionConfig` 3189 Default configuration for all concatenation view composition operators ( ``concat``, 3190 ``hconcat``, and ``vconcat`` ) 3191 countTitle : string 3192 Default axis and legend title for count fields. 3193 3194 **Default value:** ``'Count of Records``. 3195 errorband : :class:`ErrorBandConfig` 3196 ErrorBand Config 3197 errorbar : :class:`ErrorBarConfig` 3198 ErrorBar Config 3199 facet : :class:`CompositionConfig` 3200 Default configuration for the ``facet`` view composition operator 3201 fieldTitle : enum('verbal', 'functional', 'plain') 3202 Defines how Vega-Lite generates title for fields. There are three possible styles: 3203 3204 3205 * ``"verbal"`` (Default) - displays function in a verbal style (e.g., "Sum of 3206 field", "Year-month of date", "field (binned)"). 3207 * ``"function"`` - displays function using parentheses and capitalized texts (e.g., 3208 "SUM(field)", "YEARMONTH(date)", "BIN(field)"). 3209 * ``"plain"`` - displays only the field name without functions (e.g., "field", 3210 "date", "field"). 3211 geoshape : :class:`MarkConfig` 3212 Geoshape-Specific Config 3213 header : :class:`HeaderConfig` 3214 Header configuration, which determines default properties for all `headers 3215 <https://vega.github.io/vega-lite/docs/header.html>`__. 3216 3217 For a full list of header configuration options, please see the `corresponding 3218 section of in the header documentation 3219 <https://vega.github.io/vega-lite/docs/header.html#config>`__. 3220 headerColumn : :class:`HeaderConfig` 3221 Header configuration, which determines default properties for column `headers 3222 <https://vega.github.io/vega-lite/docs/header.html>`__. 3223 3224 For a full list of header configuration options, please see the `corresponding 3225 section of in the header documentation 3226 <https://vega.github.io/vega-lite/docs/header.html#config>`__. 3227 headerFacet : :class:`HeaderConfig` 3228 Header configuration, which determines default properties for non-row/column facet 3229 `headers <https://vega.github.io/vega-lite/docs/header.html>`__. 3230 3231 For a full list of header configuration options, please see the `corresponding 3232 section of in the header documentation 3233 <https://vega.github.io/vega-lite/docs/header.html#config>`__. 3234 headerRow : :class:`HeaderConfig` 3235 Header configuration, which determines default properties for row `headers 3236 <https://vega.github.io/vega-lite/docs/header.html>`__. 3237 3238 For a full list of header configuration options, please see the `corresponding 3239 section of in the header documentation 3240 <https://vega.github.io/vega-lite/docs/header.html#config>`__. 3241 invalidValues : enum('filter', None) 3242 Defines how Vega-Lite should handle invalid values ( ``null`` and ``NaN`` ). 3243 3244 3245 * If set to ``"filter"`` (default), all data items with null values will be skipped 3246 (for line, trail, and area marks) or filtered (for other marks). 3247 * If ``null``, all data items are included. In this case, invalid values will be 3248 interpreted as zeroes. 3249 legend : :class:`LegendConfig` 3250 Legend configuration, which determines default properties for all `legends 3251 <https://vega.github.io/vega-lite/docs/legend.html>`__. For a full list of legend 3252 configuration options, please see the `corresponding section of in the legend 3253 documentation <https://vega.github.io/vega-lite/docs/legend.html#config>`__. 3254 line : :class:`LineConfig` 3255 Line-Specific Config 3256 mark : :class:`MarkConfig` 3257 Mark Config 3258 numberFormat : string 3259 D3 Number format for guide labels and text marks. For example "s" for SI units. Use 3260 `D3's number format pattern <https://github.com/d3/d3-format#locale_format>`__. 3261 padding : :class:`Padding` 3262 The default visualization padding, in pixels, from the edge of the visualization 3263 canvas to the data rectangle. If a number, specifies padding for all sides. 3264 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 3265 "bottom": 5}`` to specify padding for each side of the visualization. 3266 3267 **Default value** : ``5`` 3268 point : :class:`MarkConfig` 3269 Point-Specific Config 3270 projection : :class:`ProjectionConfig` 3271 Projection configuration, which determines default properties for all `projections 3272 <https://vega.github.io/vega-lite/docs/projection.html>`__. For a full list of 3273 projection configuration options, please see the `corresponding section of the 3274 projection documentation 3275 <https://vega.github.io/vega-lite/docs/projection.html#config>`__. 3276 range : :class:`RangeConfig` 3277 An object hash that defines default range arrays or schemes for using with scales. 3278 For a full list of scale range configuration options, please see the `corresponding 3279 section of the scale documentation 3280 <https://vega.github.io/vega-lite/docs/scale.html#config>`__. 3281 rect : :class:`RectConfig` 3282 Rect-Specific Config 3283 repeat : :class:`CompositionConfig` 3284 Default configuration for the ``repeat`` view composition operator 3285 rule : :class:`MarkConfig` 3286 Rule-Specific Config 3287 scale : :class:`ScaleConfig` 3288 Scale configuration determines default properties for all `scales 3289 <https://vega.github.io/vega-lite/docs/scale.html>`__. For a full list of scale 3290 configuration options, please see the `corresponding section of the scale 3291 documentation <https://vega.github.io/vega-lite/docs/scale.html#config>`__. 3292 selection : :class:`SelectionConfig` 3293 An object hash for defining default properties for each type of selections. 3294 square : :class:`MarkConfig` 3295 Square-Specific Config 3296 stack : :class:`StackOffset` 3297 Default stack offset for stackable mark. 3298 style : :class:`StyleConfigIndex` 3299 An object hash that defines key-value mappings to determine default properties for 3300 marks with a given `style 3301 <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. The keys represent 3302 styles names; the values have to be valid `mark configuration objects 3303 <https://vega.github.io/vega-lite/docs/mark.html#config>`__. 3304 text : :class:`TextConfig` 3305 Text-Specific Config 3306 tick : :class:`TickConfig` 3307 Tick-Specific Config 3308 timeFormat : string 3309 Default time format for raw time values (without time units) in text marks, legend 3310 labels and header labels. 3311 3312 **Default value:** ``"%b %d, %Y"`` 3313 **Note:** Axes automatically determine format each label automatically so this 3314 config would not affect axes. 3315 title : :class:`TitleConfig` 3316 Title configuration, which determines default properties for all `titles 3317 <https://vega.github.io/vega-lite/docs/title.html>`__. For a full list of title 3318 configuration options, please see the `corresponding section of the title 3319 documentation <https://vega.github.io/vega-lite/docs/title.html#config>`__. 3320 trail : :class:`LineConfig` 3321 Trail-Specific Config 3322 view : :class:`ViewConfig` 3323 Default properties for `single view plots 3324 <https://vega.github.io/vega-lite/docs/spec.html#single>`__. 3325 """ 3326 _schema = {'$ref': '#/definitions/Config'} 3327 3328 def __init__(self, area=Undefined, autosize=Undefined, axis=Undefined, axisBand=Undefined, 3329 axisBottom=Undefined, axisLeft=Undefined, axisRight=Undefined, axisTop=Undefined, 3330 axisX=Undefined, axisY=Undefined, background=Undefined, bar=Undefined, 3331 boxplot=Undefined, circle=Undefined, concat=Undefined, countTitle=Undefined, 3332 errorband=Undefined, errorbar=Undefined, facet=Undefined, fieldTitle=Undefined, 3333 geoshape=Undefined, header=Undefined, headerColumn=Undefined, headerFacet=Undefined, 3334 headerRow=Undefined, invalidValues=Undefined, legend=Undefined, line=Undefined, 3335 mark=Undefined, numberFormat=Undefined, padding=Undefined, point=Undefined, 3336 projection=Undefined, range=Undefined, rect=Undefined, repeat=Undefined, 3337 rule=Undefined, scale=Undefined, selection=Undefined, square=Undefined, 3338 stack=Undefined, style=Undefined, text=Undefined, tick=Undefined, timeFormat=Undefined, 3339 title=Undefined, trail=Undefined, view=Undefined, **kwds): 3340 super(Config, self).__init__(area=area, autosize=autosize, axis=axis, axisBand=axisBand, 3341 axisBottom=axisBottom, axisLeft=axisLeft, axisRight=axisRight, 3342 axisTop=axisTop, axisX=axisX, axisY=axisY, background=background, 3343 bar=bar, boxplot=boxplot, circle=circle, concat=concat, 3344 countTitle=countTitle, errorband=errorband, errorbar=errorbar, 3345 facet=facet, fieldTitle=fieldTitle, geoshape=geoshape, 3346 header=header, headerColumn=headerColumn, headerFacet=headerFacet, 3347 headerRow=headerRow, invalidValues=invalidValues, legend=legend, 3348 line=line, mark=mark, numberFormat=numberFormat, padding=padding, 3349 point=point, projection=projection, range=range, rect=rect, 3350 repeat=repeat, rule=rule, scale=scale, selection=selection, 3351 square=square, stack=stack, style=style, text=text, tick=tick, 3352 timeFormat=timeFormat, title=title, trail=trail, view=view, **kwds) 3353 3354 3355class Cursor(VegaLiteSchema): 3356 """Cursor schema wrapper 3357 3358 enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 3359 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 3360 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 3361 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 3362 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing') 3363 """ 3364 _schema = {'$ref': '#/definitions/Cursor'} 3365 3366 def __init__(self, *args): 3367 super(Cursor, self).__init__(*args) 3368 3369 3370class Data(VegaLiteSchema): 3371 """Data schema wrapper 3372 3373 anyOf(:class:`DataSource`, :class:`Generator`) 3374 """ 3375 _schema = {'$ref': '#/definitions/Data'} 3376 3377 def __init__(self, *args, **kwds): 3378 super(Data, self).__init__(*args, **kwds) 3379 3380 3381class DataFormat(VegaLiteSchema): 3382 """DataFormat schema wrapper 3383 3384 anyOf(:class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, 3385 :class:`TopoDataFormat`) 3386 """ 3387 _schema = {'$ref': '#/definitions/DataFormat'} 3388 3389 def __init__(self, *args, **kwds): 3390 super(DataFormat, self).__init__(*args, **kwds) 3391 3392 3393class CsvDataFormat(DataFormat): 3394 """CsvDataFormat schema wrapper 3395 3396 Mapping(required=[]) 3397 3398 Attributes 3399 ---------- 3400 3401 parse : anyOf(:class:`Parse`, None) 3402 If set to ``null``, disable type inference based on the spec and only use type 3403 inference based on the data. 3404 Alternatively, a parsing directive object can be provided for explicit data types. 3405 Each property of the object corresponds to a field name, and the value to the 3406 desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not 3407 parse the field)). 3408 For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field 3409 in each input record a Date value. 3410 3411 For ``"date"``, we parse data based using Javascript's `Date.parse() 3412 <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__. 3413 For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using 3414 the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__. 3415 UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ). 3416 See more about `UTC time 3417 <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__ 3418 type : enum('csv', 'tsv') 3419 Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. 3420 3421 **Default value:** The default format type is determined by the extension of the 3422 file URL. 3423 If no extension is detected, ``"json"`` will be used by default. 3424 """ 3425 _schema = {'$ref': '#/definitions/CsvDataFormat'} 3426 3427 def __init__(self, parse=Undefined, type=Undefined, **kwds): 3428 super(CsvDataFormat, self).__init__(parse=parse, type=type, **kwds) 3429 3430 3431class DataSource(Data): 3432 """DataSource schema wrapper 3433 3434 anyOf(:class:`UrlData`, :class:`InlineData`, :class:`NamedData`) 3435 """ 3436 _schema = {'$ref': '#/definitions/DataSource'} 3437 3438 def __init__(self, *args, **kwds): 3439 super(DataSource, self).__init__(*args, **kwds) 3440 3441 3442class Datasets(VegaLiteSchema): 3443 """Datasets schema wrapper 3444 3445 Mapping(required=[]) 3446 """ 3447 _schema = {'$ref': '#/definitions/Datasets'} 3448 3449 def __init__(self, **kwds): 3450 super(Datasets, self).__init__(**kwds) 3451 3452 3453class Day(VegaLiteSchema): 3454 """Day schema wrapper 3455 3456 float 3457 """ 3458 _schema = {'$ref': '#/definitions/Day'} 3459 3460 def __init__(self, *args): 3461 super(Day, self).__init__(*args) 3462 3463 3464class DictInlineDataset(VegaLiteSchema): 3465 """DictInlineDataset schema wrapper 3466 3467 Mapping(required=[]) 3468 """ 3469 _schema = {'$ref': '#/definitions/Dict<InlineDataset>'} 3470 3471 def __init__(self, **kwds): 3472 super(DictInlineDataset, self).__init__(**kwds) 3473 3474 3475class Dir(VegaLiteSchema): 3476 """Dir schema wrapper 3477 3478 enum('ltr', 'rtl') 3479 """ 3480 _schema = {'$ref': '#/definitions/Dir'} 3481 3482 def __init__(self, *args): 3483 super(Dir, self).__init__(*args) 3484 3485 3486class DsvDataFormat(DataFormat): 3487 """DsvDataFormat schema wrapper 3488 3489 Mapping(required=[delimiter]) 3490 3491 Attributes 3492 ---------- 3493 3494 delimiter : string 3495 The delimiter between records. The delimiter must be a single character (i.e., a 3496 single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are 3497 not. 3498 parse : anyOf(:class:`Parse`, None) 3499 If set to ``null``, disable type inference based on the spec and only use type 3500 inference based on the data. 3501 Alternatively, a parsing directive object can be provided for explicit data types. 3502 Each property of the object corresponds to a field name, and the value to the 3503 desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not 3504 parse the field)). 3505 For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field 3506 in each input record a Date value. 3507 3508 For ``"date"``, we parse data based using Javascript's `Date.parse() 3509 <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__. 3510 For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using 3511 the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__. 3512 UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ). 3513 See more about `UTC time 3514 <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__ 3515 type : enum('dsv') 3516 Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. 3517 3518 **Default value:** The default format type is determined by the extension of the 3519 file URL. 3520 If no extension is detected, ``"json"`` will be used by default. 3521 """ 3522 _schema = {'$ref': '#/definitions/DsvDataFormat'} 3523 3524 def __init__(self, delimiter=Undefined, parse=Undefined, type=Undefined, **kwds): 3525 super(DsvDataFormat, self).__init__(delimiter=delimiter, parse=parse, type=type, **kwds) 3526 3527 3528class Element(VegaLiteSchema): 3529 """Element schema wrapper 3530 3531 string 3532 """ 3533 _schema = {'$ref': '#/definitions/Element'} 3534 3535 def __init__(self, *args): 3536 super(Element, self).__init__(*args) 3537 3538 3539class Encoding(VegaLiteSchema): 3540 """Encoding schema wrapper 3541 3542 Mapping(required=[]) 3543 3544 Attributes 3545 ---------- 3546 3547 color : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`) 3548 Color of the marks – either fill or stroke color based on the ``filled`` property 3549 of mark definition. 3550 By default, ``color`` represents fill color for ``"area"``, ``"bar"``, ``"tick"``, 3551 ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` / stroke color for 3552 ``"line"`` and ``"point"``. 3553 3554 **Default value:** If undefined, the default color depends on `mark config 3555 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property. 3556 3557 *Note:* 3558 1) For fine-grained control over both fill and stroke colors of the marks, please 3559 use the ``fill`` and ``stroke`` channels. If either ``fill`` or ``stroke`` channel 3560 is specified, ``color`` channel will be ignored. 3561 2) See the scale documentation for more information about customizing `color scheme 3562 <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__. 3563 detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`)) 3564 Additional levels of detail for grouping data in aggregate views and 3565 in line, trail, and area marks without mapping data to a specific visual channel. 3566 fill : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`) 3567 Fill color of the marks. 3568 **Default value:** If undefined, the default color depends on `mark config 3569 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property. 3570 3571 *Note:* When using ``fill`` channel, ``color`` channel will be ignored. To customize 3572 both fill and stroke, please use ``fill`` and ``stroke`` channels (not ``fill`` and 3573 ``color`` ). 3574 fillOpacity : anyOf(:class:`NumericFieldDefWithCondition`, 3575 :class:`NumericValueDefWithCondition`) 3576 Fill opacity of the marks. 3577 3578 **Default value:** If undefined, the default opacity depends on `mark config 3579 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``fillOpacity`` 3580 property. 3581 href : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`) 3582 A URL to load upon mouse click. 3583 key : :class:`FieldDefWithoutScale` 3584 A data field to use as a unique key for data binding. When a visualization’s data is 3585 updated, the key value will be used to match data elements to existing mark 3586 instances. Use a key channel to enable object constancy for transitions over dynamic 3587 data. 3588 latitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`) 3589 Latitude position of geographically projected marks. 3590 latitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 3591 Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, 3592 ``"rect"``, and ``"rule"``. 3593 longitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`) 3594 Longitude position of geographically projected marks. 3595 longitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 3596 Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, 3597 ``"rect"``, and ``"rule"``. 3598 opacity : anyOf(:class:`NumericFieldDefWithCondition`, 3599 :class:`NumericValueDefWithCondition`) 3600 Opacity of the marks. 3601 3602 **Default value:** If undefined, the default opacity depends on `mark config 3603 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``opacity`` property. 3604 order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`NumberValueDef`) 3605 Order of the marks. 3606 3607 3608 * For stacked marks, this ``order`` channel encodes `stack order 3609 <https://vega.github.io/vega-lite/docs/stack.html#order>`__. 3610 * For line and trail marks, this ``order`` channel encodes order of data points in 3611 the lines. This can be useful for creating `a connected scatterplot 3612 <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. 3613 Setting ``order`` to ``{"value": null}`` makes the line marks use the original 3614 order in the data sources. 3615 * Otherwise, this ``order`` channel encodes layer order of the marks. 3616 3617 **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid 3618 creating additional aggregation grouping. 3619 shape : anyOf(:class:`ShapeFieldDefWithCondition`, :class:`ShapeValueDefWithCondition`) 3620 Shape of the mark. 3621 3622 3623 #. 3624 For ``point`` marks the supported values include: 3625 3626 3627 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 3628 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 3629 ``"triangle-left"``. 3630 * the line symbol ``"stroke"`` 3631 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 3632 * a custom `SVG path string 3633 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 3634 sizing, custom shape paths should be defined within a square bounding box with 3635 coordinates ranging from -1 to 1 along both the x and y dimensions.) 3636 3637 #. 3638 For ``geoshape`` marks it should be a field definition of the geojson data 3639 3640 **Default value:** If undefined, the default shape depends on `mark config 3641 <https://vega.github.io/vega-lite/docs/config.html#point-config>`__ 's ``shape`` 3642 property. ( ``"circle"`` if unset.) 3643 size : anyOf(:class:`NumericFieldDefWithCondition`, :class:`NumericValueDefWithCondition`) 3644 Size of the mark. 3645 3646 3647 * For ``"point"``, ``"square"`` and ``"circle"``, – the symbol size, or pixel area 3648 of the mark. 3649 * For ``"bar"`` and ``"tick"`` – the bar and tick's size. 3650 * For ``"text"`` – the text's font size. 3651 * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"`` 3652 instead of line with varying size) 3653 stroke : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`) 3654 Stroke color of the marks. 3655 **Default value:** If undefined, the default color depends on `mark config 3656 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property. 3657 3658 *Note:* When using ``stroke`` channel, ``color`` channel will be ignored. To 3659 customize both stroke and fill, please use ``stroke`` and ``fill`` channels (not 3660 ``stroke`` and ``color`` ). 3661 strokeOpacity : anyOf(:class:`NumericFieldDefWithCondition`, 3662 :class:`NumericValueDefWithCondition`) 3663 Stroke opacity of the marks. 3664 3665 **Default value:** If undefined, the default opacity depends on `mark config 3666 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeOpacity`` 3667 property. 3668 strokeWidth : anyOf(:class:`NumericFieldDefWithCondition`, 3669 :class:`NumericValueDefWithCondition`) 3670 Stroke width of the marks. 3671 3672 **Default value:** If undefined, the default stroke width depends on `mark config 3673 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeWidth`` 3674 property. 3675 text : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`) 3676 Text of the ``text`` mark. 3677 tooltip : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`, 3678 List(:class:`TextFieldDef`), None) 3679 The tooltip text to show upon mouse hover. 3680 x : anyOf(:class:`PositionFieldDef`, :class:`XValueDef`) 3681 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 3682 specified ``x2`` or ``width``. 3683 3684 The ``value`` of this channel can be a number or a string ``"width"`` for the width 3685 of the plot. 3686 x2 : anyOf(:class:`SecondaryFieldDef`, :class:`XValueDef`) 3687 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 3688 3689 The ``value`` of this channel can be a number or a string ``"width"`` for the width 3690 of the plot. 3691 xError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 3692 Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``. 3693 xError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 3694 Secondary error value of x coordinates for error specified ``"errorbar"`` and 3695 ``"errorband"``. 3696 y : anyOf(:class:`PositionFieldDef`, :class:`YValueDef`) 3697 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 3698 specified ``y2`` or ``height``. 3699 3700 The ``value`` of this channel can be a number or a string ``"height"`` for the 3701 height of the plot. 3702 y2 : anyOf(:class:`SecondaryFieldDef`, :class:`YValueDef`) 3703 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 3704 3705 The ``value`` of this channel can be a number or a string ``"height"`` for the 3706 height of the plot. 3707 yError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 3708 Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``. 3709 yError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 3710 Secondary error value of y coordinates for error specified ``"errorbar"`` and 3711 ``"errorband"``. 3712 """ 3713 _schema = {'$ref': '#/definitions/Encoding'} 3714 3715 def __init__(self, color=Undefined, detail=Undefined, fill=Undefined, fillOpacity=Undefined, 3716 href=Undefined, key=Undefined, latitude=Undefined, latitude2=Undefined, 3717 longitude=Undefined, longitude2=Undefined, opacity=Undefined, order=Undefined, 3718 shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined, 3719 strokeWidth=Undefined, text=Undefined, tooltip=Undefined, x=Undefined, x2=Undefined, 3720 xError=Undefined, xError2=Undefined, y=Undefined, y2=Undefined, yError=Undefined, 3721 yError2=Undefined, **kwds): 3722 super(Encoding, self).__init__(color=color, detail=detail, fill=fill, fillOpacity=fillOpacity, 3723 href=href, key=key, latitude=latitude, latitude2=latitude2, 3724 longitude=longitude, longitude2=longitude2, opacity=opacity, 3725 order=order, shape=shape, size=size, stroke=stroke, 3726 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, text=text, 3727 tooltip=tooltip, x=x, x2=x2, xError=xError, xError2=xError2, y=y, 3728 y2=y2, yError=yError, yError2=yError2, **kwds) 3729 3730 3731class ErrorBand(CompositeMark): 3732 """ErrorBand schema wrapper 3733 3734 enum('errorband') 3735 """ 3736 _schema = {'$ref': '#/definitions/ErrorBand'} 3737 3738 def __init__(self, *args): 3739 super(ErrorBand, self).__init__(*args) 3740 3741 3742class ErrorBandConfig(VegaLiteSchema): 3743 """ErrorBandConfig schema wrapper 3744 3745 Mapping(required=[]) 3746 3747 Attributes 3748 ---------- 3749 3750 band : anyOf(boolean, :class:`MarkConfig`) 3751 3752 borders : anyOf(boolean, :class:`MarkConfig`) 3753 3754 extent : :class:`ErrorBarExtent` 3755 The extent of the band. Available options include: 3756 3757 3758 * ``"ci"`` : Extend the band to the confidence interval of the mean. 3759 * ``"stderr"`` : The size of band are set to the value of standard error, extending 3760 from the mean. 3761 * ``"stdev"`` : The size of band are set to the value of standard deviation, 3762 extending from the mean. 3763 * ``"iqr"`` : Extend the band to the q1 and q3. 3764 3765 **Default value:** ``"stderr"``. 3766 interpolate : :class:`Interpolate` 3767 The line interpolation method for the error band. One of the following: 3768 3769 3770 * ``"linear"`` : piecewise linear segments, as in a polyline. 3771 * ``"linear-closed"`` : close the linear segments to form a polygon. 3772 * ``"step"`` : a piecewise constant function (a step function) consisting of 3773 alternating horizontal and vertical lines. The y-value changes at the midpoint of 3774 each pair of adjacent x-values. 3775 * ``"step-before"`` : a piecewise constant function (a step function) consisting of 3776 alternating horizontal and vertical lines. The y-value changes before the x-value. 3777 * ``"step-after"`` : a piecewise constant function (a step function) consisting of 3778 alternating horizontal and vertical lines. The y-value changes after the x-value. 3779 * ``"basis"`` : a B-spline, with control point duplication on the ends. 3780 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 3781 * ``"basis-closed"`` : a closed B-spline, as in a loop. 3782 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 3783 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 3784 but will intersect other control points. 3785 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 3786 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 3787 straighten the spline. 3788 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 3789 tension : float 3790 The tension parameter for the interpolation type of the error band. 3791 """ 3792 _schema = {'$ref': '#/definitions/ErrorBandConfig'} 3793 3794 def __init__(self, band=Undefined, borders=Undefined, extent=Undefined, interpolate=Undefined, 3795 tension=Undefined, **kwds): 3796 super(ErrorBandConfig, self).__init__(band=band, borders=borders, extent=extent, 3797 interpolate=interpolate, tension=tension, **kwds) 3798 3799 3800class ErrorBandDef(CompositeMarkDef): 3801 """ErrorBandDef schema wrapper 3802 3803 Mapping(required=[type]) 3804 3805 Attributes 3806 ---------- 3807 3808 type : :class:`ErrorBand` 3809 The mark type. This could a primitive mark type 3810 (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``, 3811 ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` ) 3812 or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ). 3813 band : anyOf(boolean, :class:`MarkConfig`) 3814 3815 borders : anyOf(boolean, :class:`MarkConfig`) 3816 3817 clip : boolean 3818 Whether a composite mark be clipped to the enclosing group’s width and height. 3819 color : :class:`Color` 3820 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 3821 ``color`` and will override ``color``. 3822 3823 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 3824 ``"#4682b4"`` 3825 3826 **Note:** This property cannot be used in a `style config 3827 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 3828 extent : :class:`ErrorBarExtent` 3829 The extent of the band. Available options include: 3830 3831 3832 * ``"ci"`` : Extend the band to the confidence interval of the mean. 3833 * ``"stderr"`` : The size of band are set to the value of standard error, extending 3834 from the mean. 3835 * ``"stdev"`` : The size of band are set to the value of standard deviation, 3836 extending from the mean. 3837 * ``"iqr"`` : Extend the band to the q1 and q3. 3838 3839 **Default value:** ``"stderr"``. 3840 interpolate : :class:`Interpolate` 3841 The line interpolation method for the error band. One of the following: 3842 3843 3844 * ``"linear"`` : piecewise linear segments, as in a polyline. 3845 * ``"linear-closed"`` : close the linear segments to form a polygon. 3846 * ``"step"`` : a piecewise constant function (a step function) consisting of 3847 alternating horizontal and vertical lines. The y-value changes at the midpoint of 3848 each pair of adjacent x-values. 3849 * ``"step-before"`` : a piecewise constant function (a step function) consisting of 3850 alternating horizontal and vertical lines. The y-value changes before the x-value. 3851 * ``"step-after"`` : a piecewise constant function (a step function) consisting of 3852 alternating horizontal and vertical lines. The y-value changes after the x-value. 3853 * ``"basis"`` : a B-spline, with control point duplication on the ends. 3854 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 3855 * ``"basis-closed"`` : a closed B-spline, as in a loop. 3856 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 3857 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 3858 but will intersect other control points. 3859 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 3860 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 3861 straighten the spline. 3862 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 3863 opacity : float 3864 The opacity (value between [0,1]) of the mark. 3865 orient : :class:`Orientation` 3866 Orientation of the error band. This is normally automatically determined, but can be 3867 specified when the orientation is ambiguous and cannot be automatically determined. 3868 tension : float 3869 The tension parameter for the interpolation type of the error band. 3870 """ 3871 _schema = {'$ref': '#/definitions/ErrorBandDef'} 3872 3873 def __init__(self, type=Undefined, band=Undefined, borders=Undefined, clip=Undefined, 3874 color=Undefined, extent=Undefined, interpolate=Undefined, opacity=Undefined, 3875 orient=Undefined, tension=Undefined, **kwds): 3876 super(ErrorBandDef, self).__init__(type=type, band=band, borders=borders, clip=clip, 3877 color=color, extent=extent, interpolate=interpolate, 3878 opacity=opacity, orient=orient, tension=tension, **kwds) 3879 3880 3881class ErrorBar(CompositeMark): 3882 """ErrorBar schema wrapper 3883 3884 enum('errorbar') 3885 """ 3886 _schema = {'$ref': '#/definitions/ErrorBar'} 3887 3888 def __init__(self, *args): 3889 super(ErrorBar, self).__init__(*args) 3890 3891 3892class ErrorBarConfig(VegaLiteSchema): 3893 """ErrorBarConfig schema wrapper 3894 3895 Mapping(required=[]) 3896 3897 Attributes 3898 ---------- 3899 3900 extent : :class:`ErrorBarExtent` 3901 The extent of the rule. Available options include: 3902 3903 3904 * ``"ci"`` : Extend the rule to the confidence interval of the mean. 3905 * ``"stderr"`` : The size of rule are set to the value of standard error, extending 3906 from the mean. 3907 * ``"stdev"`` : The size of rule are set to the value of standard deviation, 3908 extending from the mean. 3909 * ``"iqr"`` : Extend the rule to the q1 and q3. 3910 3911 **Default value:** ``"stderr"``. 3912 rule : anyOf(boolean, :class:`MarkConfig`) 3913 3914 ticks : anyOf(boolean, :class:`MarkConfig`) 3915 3916 """ 3917 _schema = {'$ref': '#/definitions/ErrorBarConfig'} 3918 3919 def __init__(self, extent=Undefined, rule=Undefined, ticks=Undefined, **kwds): 3920 super(ErrorBarConfig, self).__init__(extent=extent, rule=rule, ticks=ticks, **kwds) 3921 3922 3923class ErrorBarDef(CompositeMarkDef): 3924 """ErrorBarDef schema wrapper 3925 3926 Mapping(required=[type]) 3927 3928 Attributes 3929 ---------- 3930 3931 type : :class:`ErrorBar` 3932 The mark type. This could a primitive mark type 3933 (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``, 3934 ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` ) 3935 or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ). 3936 clip : boolean 3937 Whether a composite mark be clipped to the enclosing group’s width and height. 3938 color : :class:`Color` 3939 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 3940 ``color`` and will override ``color``. 3941 3942 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 3943 ``"#4682b4"`` 3944 3945 **Note:** This property cannot be used in a `style config 3946 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 3947 extent : :class:`ErrorBarExtent` 3948 The extent of the rule. Available options include: 3949 3950 3951 * ``"ci"`` : Extend the rule to the confidence interval of the mean. 3952 * ``"stderr"`` : The size of rule are set to the value of standard error, extending 3953 from the mean. 3954 * ``"stdev"`` : The size of rule are set to the value of standard deviation, 3955 extending from the mean. 3956 * ``"iqr"`` : Extend the rule to the q1 and q3. 3957 3958 **Default value:** ``"stderr"``. 3959 opacity : float 3960 The opacity (value between [0,1]) of the mark. 3961 orient : :class:`Orientation` 3962 Orientation of the error bar. This is normally automatically determined, but can be 3963 specified when the orientation is ambiguous and cannot be automatically determined. 3964 rule : anyOf(boolean, :class:`MarkConfig`) 3965 3966 ticks : anyOf(boolean, :class:`MarkConfig`) 3967 3968 """ 3969 _schema = {'$ref': '#/definitions/ErrorBarDef'} 3970 3971 def __init__(self, type=Undefined, clip=Undefined, color=Undefined, extent=Undefined, 3972 opacity=Undefined, orient=Undefined, rule=Undefined, ticks=Undefined, **kwds): 3973 super(ErrorBarDef, self).__init__(type=type, clip=clip, color=color, extent=extent, 3974 opacity=opacity, orient=orient, rule=rule, ticks=ticks, **kwds) 3975 3976 3977class ErrorBarExtent(VegaLiteSchema): 3978 """ErrorBarExtent schema wrapper 3979 3980 enum('ci', 'iqr', 'stderr', 'stdev') 3981 """ 3982 _schema = {'$ref': '#/definitions/ErrorBarExtent'} 3983 3984 def __init__(self, *args): 3985 super(ErrorBarExtent, self).__init__(*args) 3986 3987 3988class EventStream(VegaLiteSchema): 3989 """EventStream schema wrapper 3990 3991 Any 3992 """ 3993 _schema = {'$ref': '#/definitions/EventStream'} 3994 3995 def __init__(self, *args, **kwds): 3996 super(EventStream, self).__init__(*args, **kwds) 3997 3998 3999class FacetFieldDef(VegaLiteSchema): 4000 """FacetFieldDef schema wrapper 4001 4002 Mapping(required=[type]) 4003 4004 Attributes 4005 ---------- 4006 4007 type : :class:`StandardType` 4008 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 4009 ``"ordinal"``, or ``"nominal"`` ). 4010 It can also be a ``"geojson"`` type for encoding `'geoshape' 4011 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 4012 4013 **Note:** 4014 4015 4016 * Data values for a temporal field can be either a date-time string (e.g., 4017 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 4018 timestamp number (e.g., ``1552199579097`` ). 4019 * Data ``type`` describes the semantics of the data rather than the primitive data 4020 types ( ``number``, ``string``, etc.). The same primitive data type can have 4021 different types of measurement. For example, numeric data can represent 4022 quantitative, ordinal, or nominal data. 4023 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 4024 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 4025 or `"ordinal" (for using an ordinal bin scale) 4026 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4027 * When using with `timeUnit 4028 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 4029 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 4030 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4031 * When using with `aggregate 4032 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 4033 refers to the post-aggregation data type. For example, we can calculate count 4034 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 4035 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 4036 is ``"quantitative"``. 4037 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 4038 ``type`` as they have exactly the same type as their primary channels (e.g., 4039 ``x``, ``y`` ). 4040 4041 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 4042 documentation. 4043 aggregate : :class:`Aggregate` 4044 Aggregation function for the field 4045 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 4046 4047 **Default value:** ``undefined`` (None) 4048 4049 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 4050 documentation. 4051 bin : anyOf(boolean, :class:`BinParams`, None) 4052 A flag for binning a ``quantitative`` field, `an object defining binning parameters 4053 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 4054 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 4055 ``"binned"`` ). 4056 4057 4058 If ``true``, default `binning parameters 4059 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 4060 4061 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 4062 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 4063 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 4064 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 4065 set the axis's `tickMinStep 4066 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 4067 4068 **Default value:** ``false`` 4069 4070 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 4071 documentation. 4072 field : :class:`Field` 4073 **Required.** A string defining the name of the field from which to pull a data 4074 value 4075 or an object defining iterated values from the `repeat 4076 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 4077 4078 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 4079 documentation. 4080 4081 **Notes:** 4082 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 4083 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 4084 If field names contain dots or brackets but are not nested, you can use ``\\`` to 4085 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 4086 See more details about escaping in the `field documentation 4087 <https://vega.github.io/vega-lite/docs/field.html>`__. 4088 2) ``field`` is not required if ``aggregate`` is ``count``. 4089 header : :class:`Header` 4090 An object defining properties of a facet's header. 4091 sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None) 4092 Sort order for the encoded field. 4093 4094 For continuous fields (quantitative or temporal), ``sort`` can be either 4095 ``"ascending"`` or ``"descending"``. 4096 4097 For discrete fields, ``sort`` can be one of the following: 4098 4099 4100 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 4101 Javascript. 4102 * `A sort field definition 4103 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 4104 another field. 4105 * `An array specifying the field values in preferred order 4106 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 4107 sort order will obey the values in the array, followed by any unspecified values 4108 in their original order. For discrete time field, values in the sort array can be 4109 `date-time definition objects <types#datetime>`__. In addition, for time units 4110 ``"month"`` and ``"day"``, the values can be the month or day names (case 4111 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 4112 * ``null`` indicating no sort. 4113 4114 **Default value:** ``"ascending"`` 4115 4116 **Note:** ``null`` is not supported for ``row`` and ``column``. 4117 timeUnit : :class:`TimeUnit` 4118 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 4119 field. 4120 or `a temporal field that gets casted as ordinal 4121 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 4122 4123 **Default value:** ``undefined`` (None) 4124 4125 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 4126 documentation. 4127 title : anyOf(string, None) 4128 A title for the field. If ``null``, the title will be removed. 4129 4130 **Default value:** derived from the field's name and transformation function ( 4131 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 4132 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 4133 field is binned or has a time unit applied, the applied function is shown in 4134 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 4135 Otherwise, the title is simply the field name. 4136 4137 **Notes** : 4138 4139 1) You can customize the default field title format by providing the `fieldTitle 4140 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 4141 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 4142 function via the compile function's options 4143 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 4144 4145 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 4146 defined, axis/header/legend title will be used. 4147 """ 4148 _schema = {'$ref': '#/definitions/FacetFieldDef'} 4149 4150 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined, 4151 header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, **kwds): 4152 super(FacetFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field, 4153 header=header, sort=sort, timeUnit=timeUnit, title=title, 4154 **kwds) 4155 4156 4157class FacetMapping(VegaLiteSchema): 4158 """FacetMapping schema wrapper 4159 4160 Mapping(required=[]) 4161 4162 Attributes 4163 ---------- 4164 4165 column : :class:`FacetFieldDef` 4166 A field definition for the horizontal facet of trellis plots. 4167 row : :class:`FacetFieldDef` 4168 A field definition for the vertical facet of trellis plots. 4169 """ 4170 _schema = {'$ref': '#/definitions/FacetMapping'} 4171 4172 def __init__(self, column=Undefined, row=Undefined, **kwds): 4173 super(FacetMapping, self).__init__(column=column, row=row, **kwds) 4174 4175 4176class FacetedEncoding(VegaLiteSchema): 4177 """FacetedEncoding schema wrapper 4178 4179 Mapping(required=[]) 4180 4181 Attributes 4182 ---------- 4183 4184 color : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`) 4185 Color of the marks – either fill or stroke color based on the ``filled`` property 4186 of mark definition. 4187 By default, ``color`` represents fill color for ``"area"``, ``"bar"``, ``"tick"``, 4188 ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` / stroke color for 4189 ``"line"`` and ``"point"``. 4190 4191 **Default value:** If undefined, the default color depends on `mark config 4192 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property. 4193 4194 *Note:* 4195 1) For fine-grained control over both fill and stroke colors of the marks, please 4196 use the ``fill`` and ``stroke`` channels. If either ``fill`` or ``stroke`` channel 4197 is specified, ``color`` channel will be ignored. 4198 2) See the scale documentation for more information about customizing `color scheme 4199 <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__. 4200 column : :class:`FacetFieldDef` 4201 A field definition for the horizontal facet of trellis plots. 4202 detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`)) 4203 Additional levels of detail for grouping data in aggregate views and 4204 in line, trail, and area marks without mapping data to a specific visual channel. 4205 facet : :class:`FacetFieldDef` 4206 A field definition for the (flexible) facet of trellis plots. 4207 4208 If either ``row`` or ``column`` is specified, this channel will be ignored. 4209 fill : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`) 4210 Fill color of the marks. 4211 **Default value:** If undefined, the default color depends on `mark config 4212 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property. 4213 4214 *Note:* When using ``fill`` channel, ``color`` channel will be ignored. To customize 4215 both fill and stroke, please use ``fill`` and ``stroke`` channels (not ``fill`` and 4216 ``color`` ). 4217 fillOpacity : anyOf(:class:`NumericFieldDefWithCondition`, 4218 :class:`NumericValueDefWithCondition`) 4219 Fill opacity of the marks. 4220 4221 **Default value:** If undefined, the default opacity depends on `mark config 4222 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``fillOpacity`` 4223 property. 4224 href : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`) 4225 A URL to load upon mouse click. 4226 key : :class:`FieldDefWithoutScale` 4227 A data field to use as a unique key for data binding. When a visualization’s data is 4228 updated, the key value will be used to match data elements to existing mark 4229 instances. Use a key channel to enable object constancy for transitions over dynamic 4230 data. 4231 latitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`) 4232 Latitude position of geographically projected marks. 4233 latitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 4234 Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, 4235 ``"rect"``, and ``"rule"``. 4236 longitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`) 4237 Longitude position of geographically projected marks. 4238 longitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 4239 Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, 4240 ``"rect"``, and ``"rule"``. 4241 opacity : anyOf(:class:`NumericFieldDefWithCondition`, 4242 :class:`NumericValueDefWithCondition`) 4243 Opacity of the marks. 4244 4245 **Default value:** If undefined, the default opacity depends on `mark config 4246 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``opacity`` property. 4247 order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`NumberValueDef`) 4248 Order of the marks. 4249 4250 4251 * For stacked marks, this ``order`` channel encodes `stack order 4252 <https://vega.github.io/vega-lite/docs/stack.html#order>`__. 4253 * For line and trail marks, this ``order`` channel encodes order of data points in 4254 the lines. This can be useful for creating `a connected scatterplot 4255 <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. 4256 Setting ``order`` to ``{"value": null}`` makes the line marks use the original 4257 order in the data sources. 4258 * Otherwise, this ``order`` channel encodes layer order of the marks. 4259 4260 **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid 4261 creating additional aggregation grouping. 4262 row : :class:`FacetFieldDef` 4263 A field definition for the vertical facet of trellis plots. 4264 shape : anyOf(:class:`ShapeFieldDefWithCondition`, :class:`ShapeValueDefWithCondition`) 4265 Shape of the mark. 4266 4267 4268 #. 4269 For ``point`` marks the supported values include: 4270 4271 4272 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 4273 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 4274 ``"triangle-left"``. 4275 * the line symbol ``"stroke"`` 4276 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 4277 * a custom `SVG path string 4278 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 4279 sizing, custom shape paths should be defined within a square bounding box with 4280 coordinates ranging from -1 to 1 along both the x and y dimensions.) 4281 4282 #. 4283 For ``geoshape`` marks it should be a field definition of the geojson data 4284 4285 **Default value:** If undefined, the default shape depends on `mark config 4286 <https://vega.github.io/vega-lite/docs/config.html#point-config>`__ 's ``shape`` 4287 property. ( ``"circle"`` if unset.) 4288 size : anyOf(:class:`NumericFieldDefWithCondition`, :class:`NumericValueDefWithCondition`) 4289 Size of the mark. 4290 4291 4292 * For ``"point"``, ``"square"`` and ``"circle"``, – the symbol size, or pixel area 4293 of the mark. 4294 * For ``"bar"`` and ``"tick"`` – the bar and tick's size. 4295 * For ``"text"`` – the text's font size. 4296 * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"`` 4297 instead of line with varying size) 4298 stroke : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`) 4299 Stroke color of the marks. 4300 **Default value:** If undefined, the default color depends on `mark config 4301 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property. 4302 4303 *Note:* When using ``stroke`` channel, ``color`` channel will be ignored. To 4304 customize both stroke and fill, please use ``stroke`` and ``fill`` channels (not 4305 ``stroke`` and ``color`` ). 4306 strokeOpacity : anyOf(:class:`NumericFieldDefWithCondition`, 4307 :class:`NumericValueDefWithCondition`) 4308 Stroke opacity of the marks. 4309 4310 **Default value:** If undefined, the default opacity depends on `mark config 4311 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeOpacity`` 4312 property. 4313 strokeWidth : anyOf(:class:`NumericFieldDefWithCondition`, 4314 :class:`NumericValueDefWithCondition`) 4315 Stroke width of the marks. 4316 4317 **Default value:** If undefined, the default stroke width depends on `mark config 4318 <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeWidth`` 4319 property. 4320 text : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`) 4321 Text of the ``text`` mark. 4322 tooltip : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`, 4323 List(:class:`TextFieldDef`), None) 4324 The tooltip text to show upon mouse hover. 4325 x : anyOf(:class:`PositionFieldDef`, :class:`XValueDef`) 4326 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 4327 specified ``x2`` or ``width``. 4328 4329 The ``value`` of this channel can be a number or a string ``"width"`` for the width 4330 of the plot. 4331 x2 : anyOf(:class:`SecondaryFieldDef`, :class:`XValueDef`) 4332 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 4333 4334 The ``value`` of this channel can be a number or a string ``"width"`` for the width 4335 of the plot. 4336 xError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 4337 Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``. 4338 xError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 4339 Secondary error value of x coordinates for error specified ``"errorbar"`` and 4340 ``"errorband"``. 4341 y : anyOf(:class:`PositionFieldDef`, :class:`YValueDef`) 4342 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 4343 specified ``y2`` or ``height``. 4344 4345 The ``value`` of this channel can be a number or a string ``"height"`` for the 4346 height of the plot. 4347 y2 : anyOf(:class:`SecondaryFieldDef`, :class:`YValueDef`) 4348 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 4349 4350 The ``value`` of this channel can be a number or a string ``"height"`` for the 4351 height of the plot. 4352 yError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 4353 Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``. 4354 yError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`) 4355 Secondary error value of y coordinates for error specified ``"errorbar"`` and 4356 ``"errorband"``. 4357 """ 4358 _schema = {'$ref': '#/definitions/FacetedEncoding'} 4359 4360 def __init__(self, color=Undefined, column=Undefined, detail=Undefined, facet=Undefined, 4361 fill=Undefined, fillOpacity=Undefined, href=Undefined, key=Undefined, 4362 latitude=Undefined, latitude2=Undefined, longitude=Undefined, longitude2=Undefined, 4363 opacity=Undefined, order=Undefined, row=Undefined, shape=Undefined, size=Undefined, 4364 stroke=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined, 4365 tooltip=Undefined, x=Undefined, x2=Undefined, xError=Undefined, xError2=Undefined, 4366 y=Undefined, y2=Undefined, yError=Undefined, yError2=Undefined, **kwds): 4367 super(FacetedEncoding, self).__init__(color=color, column=column, detail=detail, facet=facet, 4368 fill=fill, fillOpacity=fillOpacity, href=href, key=key, 4369 latitude=latitude, latitude2=latitude2, 4370 longitude=longitude, longitude2=longitude2, 4371 opacity=opacity, order=order, row=row, shape=shape, 4372 size=size, stroke=stroke, strokeOpacity=strokeOpacity, 4373 strokeWidth=strokeWidth, text=text, tooltip=tooltip, x=x, 4374 x2=x2, xError=xError, xError2=xError2, y=y, y2=y2, 4375 yError=yError, yError2=yError2, **kwds) 4376 4377 4378class Field(VegaLiteSchema): 4379 """Field schema wrapper 4380 4381 anyOf(:class:`FieldName`, :class:`RepeatRef`) 4382 """ 4383 _schema = {'$ref': '#/definitions/Field'} 4384 4385 def __init__(self, *args, **kwds): 4386 super(Field, self).__init__(*args, **kwds) 4387 4388 4389class FieldDefWithConditionMarkPropFieldDefTypeForShapestringnull(VegaLiteSchema): 4390 """FieldDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper 4391 4392 Mapping(required=[type]) 4393 A FieldDef with Condition :raw-html:`<ValueDef>` 4394 4395 Attributes 4396 ---------- 4397 4398 type : :class:`TypeForShape` 4399 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 4400 ``"ordinal"``, or ``"nominal"`` ). 4401 It can also be a ``"geojson"`` type for encoding `'geoshape' 4402 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 4403 4404 **Note:** 4405 4406 4407 * Data values for a temporal field can be either a date-time string (e.g., 4408 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 4409 timestamp number (e.g., ``1552199579097`` ). 4410 * Data ``type`` describes the semantics of the data rather than the primitive data 4411 types ( ``number``, ``string``, etc.). The same primitive data type can have 4412 different types of measurement. For example, numeric data can represent 4413 quantitative, ordinal, or nominal data. 4414 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 4415 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 4416 or `"ordinal" (for using an ordinal bin scale) 4417 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4418 * When using with `timeUnit 4419 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 4420 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 4421 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4422 * When using with `aggregate 4423 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 4424 refers to the post-aggregation data type. For example, we can calculate count 4425 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 4426 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 4427 is ``"quantitative"``. 4428 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 4429 ``type`` as they have exactly the same type as their primary channels (e.g., 4430 ``x``, ``y`` ). 4431 4432 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 4433 documentation. 4434 aggregate : :class:`Aggregate` 4435 Aggregation function for the field 4436 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 4437 4438 **Default value:** ``undefined`` (None) 4439 4440 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 4441 documentation. 4442 bin : anyOf(boolean, :class:`BinParams`, None) 4443 A flag for binning a ``quantitative`` field, `an object defining binning parameters 4444 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 4445 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 4446 ``"binned"`` ). 4447 4448 4449 If ``true``, default `binning parameters 4450 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 4451 4452 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 4453 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 4454 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 4455 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 4456 set the axis's `tickMinStep 4457 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 4458 4459 **Default value:** ``false`` 4460 4461 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 4462 documentation. 4463 condition : anyOf(:class:`ConditionalStringValueDef`, 4464 List(:class:`ConditionalStringValueDef`)) 4465 One or more value definition(s) with `a selection or a test predicate 4466 <https://vega.github.io/vega-lite/docs/condition.html>`__. 4467 4468 **Note:** A field definition's ``condition`` property can only contain `conditional 4469 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 4470 since Vega-Lite only allows at most one encoded field per encoding channel. 4471 field : :class:`Field` 4472 **Required.** A string defining the name of the field from which to pull a data 4473 value 4474 or an object defining iterated values from the `repeat 4475 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 4476 4477 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 4478 documentation. 4479 4480 **Notes:** 4481 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 4482 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 4483 If field names contain dots or brackets but are not nested, you can use ``\\`` to 4484 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 4485 See more details about escaping in the `field documentation 4486 <https://vega.github.io/vega-lite/docs/field.html>`__. 4487 2) ``field`` is not required if ``aggregate`` is ``count``. 4488 legend : anyOf(:class:`Legend`, None) 4489 An object defining properties of the legend. 4490 If ``null``, the legend for the encoding channel will be removed. 4491 4492 **Default value:** If undefined, default `legend properties 4493 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 4494 4495 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 4496 documentation. 4497 scale : anyOf(:class:`Scale`, None) 4498 An object defining properties of the channel's scale, which is the function that 4499 transforms values in the data domain (numbers, dates, strings, etc) to visual values 4500 (pixels, colors, sizes) of the encoding channels. 4501 4502 If ``null``, the scale will be `disabled and the data value will be directly encoded 4503 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 4504 4505 **Default value:** If undefined, default `scale properties 4506 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 4507 4508 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 4509 documentation. 4510 sort : :class:`Sort` 4511 Sort order for the encoded field. 4512 4513 For continuous fields (quantitative or temporal), ``sort`` can be either 4514 ``"ascending"`` or ``"descending"``. 4515 4516 For discrete fields, ``sort`` can be one of the following: 4517 4518 4519 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 4520 Javascript. 4521 * `A sort-by-encoding definition 4522 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 4523 by another encoding channel. (This type of sort definition is not available for 4524 ``row`` and ``column`` channels.) 4525 * `A sort field definition 4526 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 4527 another field. 4528 * `An array specifying the field values in preferred order 4529 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 4530 sort order will obey the values in the array, followed by any unspecified values 4531 in their original order. For discrete time field, values in the sort array can be 4532 `date-time definition objects <types#datetime>`__. In addition, for time units 4533 ``"month"`` and ``"day"``, the values can be the month or day names (case 4534 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 4535 * ``null`` indicating no sort. 4536 4537 **Default value:** ``"ascending"`` 4538 4539 **Note:** ``null`` is not supported for ``row`` and ``column``. 4540 4541 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 4542 documentation. 4543 timeUnit : :class:`TimeUnit` 4544 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 4545 field. 4546 or `a temporal field that gets casted as ordinal 4547 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 4548 4549 **Default value:** ``undefined`` (None) 4550 4551 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 4552 documentation. 4553 title : anyOf(string, None) 4554 A title for the field. If ``null``, the title will be removed. 4555 4556 **Default value:** derived from the field's name and transformation function ( 4557 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 4558 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 4559 field is binned or has a time unit applied, the applied function is shown in 4560 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 4561 Otherwise, the title is simply the field name. 4562 4563 **Notes** : 4564 4565 1) You can customize the default field title format by providing the `fieldTitle 4566 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 4567 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 4568 function via the compile function's options 4569 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 4570 4571 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 4572 defined, axis/header/legend title will be used. 4573 """ 4574 _schema = {'$ref': '#/definitions/FieldDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>'} 4575 4576 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 4577 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 4578 title=Undefined, **kwds): 4579 super(FieldDefWithConditionMarkPropFieldDefTypeForShapestringnull, self).__init__(type=type, 4580 aggregate=aggregate, 4581 bin=bin, 4582 condition=condition, 4583 field=field, 4584 legend=legend, 4585 scale=scale, 4586 sort=sort, 4587 timeUnit=timeUnit, 4588 title=title, 4589 **kwds) 4590 4591 4592class FieldDefWithConditionMarkPropFieldDefnumber(VegaLiteSchema): 4593 """FieldDefWithConditionMarkPropFieldDefnumber schema wrapper 4594 4595 Mapping(required=[type]) 4596 A FieldDef with Condition :raw-html:`<ValueDef>` 4597 4598 Attributes 4599 ---------- 4600 4601 type : :class:`StandardType` 4602 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 4603 ``"ordinal"``, or ``"nominal"`` ). 4604 It can also be a ``"geojson"`` type for encoding `'geoshape' 4605 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 4606 4607 **Note:** 4608 4609 4610 * Data values for a temporal field can be either a date-time string (e.g., 4611 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 4612 timestamp number (e.g., ``1552199579097`` ). 4613 * Data ``type`` describes the semantics of the data rather than the primitive data 4614 types ( ``number``, ``string``, etc.). The same primitive data type can have 4615 different types of measurement. For example, numeric data can represent 4616 quantitative, ordinal, or nominal data. 4617 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 4618 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 4619 or `"ordinal" (for using an ordinal bin scale) 4620 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4621 * When using with `timeUnit 4622 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 4623 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 4624 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4625 * When using with `aggregate 4626 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 4627 refers to the post-aggregation data type. For example, we can calculate count 4628 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 4629 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 4630 is ``"quantitative"``. 4631 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 4632 ``type`` as they have exactly the same type as their primary channels (e.g., 4633 ``x``, ``y`` ). 4634 4635 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 4636 documentation. 4637 aggregate : :class:`Aggregate` 4638 Aggregation function for the field 4639 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 4640 4641 **Default value:** ``undefined`` (None) 4642 4643 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 4644 documentation. 4645 bin : anyOf(boolean, :class:`BinParams`, None) 4646 A flag for binning a ``quantitative`` field, `an object defining binning parameters 4647 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 4648 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 4649 ``"binned"`` ). 4650 4651 4652 If ``true``, default `binning parameters 4653 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 4654 4655 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 4656 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 4657 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 4658 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 4659 set the axis's `tickMinStep 4660 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 4661 4662 **Default value:** ``false`` 4663 4664 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 4665 documentation. 4666 condition : anyOf(:class:`ConditionalNumberValueDef`, 4667 List(:class:`ConditionalNumberValueDef`)) 4668 One or more value definition(s) with `a selection or a test predicate 4669 <https://vega.github.io/vega-lite/docs/condition.html>`__. 4670 4671 **Note:** A field definition's ``condition`` property can only contain `conditional 4672 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 4673 since Vega-Lite only allows at most one encoded field per encoding channel. 4674 field : :class:`Field` 4675 **Required.** A string defining the name of the field from which to pull a data 4676 value 4677 or an object defining iterated values from the `repeat 4678 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 4679 4680 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 4681 documentation. 4682 4683 **Notes:** 4684 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 4685 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 4686 If field names contain dots or brackets but are not nested, you can use ``\\`` to 4687 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 4688 See more details about escaping in the `field documentation 4689 <https://vega.github.io/vega-lite/docs/field.html>`__. 4690 2) ``field`` is not required if ``aggregate`` is ``count``. 4691 legend : anyOf(:class:`Legend`, None) 4692 An object defining properties of the legend. 4693 If ``null``, the legend for the encoding channel will be removed. 4694 4695 **Default value:** If undefined, default `legend properties 4696 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 4697 4698 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 4699 documentation. 4700 scale : anyOf(:class:`Scale`, None) 4701 An object defining properties of the channel's scale, which is the function that 4702 transforms values in the data domain (numbers, dates, strings, etc) to visual values 4703 (pixels, colors, sizes) of the encoding channels. 4704 4705 If ``null``, the scale will be `disabled and the data value will be directly encoded 4706 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 4707 4708 **Default value:** If undefined, default `scale properties 4709 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 4710 4711 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 4712 documentation. 4713 sort : :class:`Sort` 4714 Sort order for the encoded field. 4715 4716 For continuous fields (quantitative or temporal), ``sort`` can be either 4717 ``"ascending"`` or ``"descending"``. 4718 4719 For discrete fields, ``sort`` can be one of the following: 4720 4721 4722 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 4723 Javascript. 4724 * `A sort-by-encoding definition 4725 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 4726 by another encoding channel. (This type of sort definition is not available for 4727 ``row`` and ``column`` channels.) 4728 * `A sort field definition 4729 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 4730 another field. 4731 * `An array specifying the field values in preferred order 4732 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 4733 sort order will obey the values in the array, followed by any unspecified values 4734 in their original order. For discrete time field, values in the sort array can be 4735 `date-time definition objects <types#datetime>`__. In addition, for time units 4736 ``"month"`` and ``"day"``, the values can be the month or day names (case 4737 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 4738 * ``null`` indicating no sort. 4739 4740 **Default value:** ``"ascending"`` 4741 4742 **Note:** ``null`` is not supported for ``row`` and ``column``. 4743 4744 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 4745 documentation. 4746 timeUnit : :class:`TimeUnit` 4747 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 4748 field. 4749 or `a temporal field that gets casted as ordinal 4750 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 4751 4752 **Default value:** ``undefined`` (None) 4753 4754 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 4755 documentation. 4756 title : anyOf(string, None) 4757 A title for the field. If ``null``, the title will be removed. 4758 4759 **Default value:** derived from the field's name and transformation function ( 4760 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 4761 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 4762 field is binned or has a time unit applied, the applied function is shown in 4763 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 4764 Otherwise, the title is simply the field name. 4765 4766 **Notes** : 4767 4768 1) You can customize the default field title format by providing the `fieldTitle 4769 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 4770 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 4771 function via the compile function's options 4772 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 4773 4774 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 4775 defined, axis/header/legend title will be used. 4776 """ 4777 _schema = {'$ref': '#/definitions/FieldDefWithCondition<MarkPropFieldDef,number>'} 4778 4779 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 4780 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 4781 title=Undefined, **kwds): 4782 super(FieldDefWithConditionMarkPropFieldDefnumber, self).__init__(type=type, 4783 aggregate=aggregate, bin=bin, 4784 condition=condition, 4785 field=field, legend=legend, 4786 scale=scale, sort=sort, 4787 timeUnit=timeUnit, 4788 title=title, **kwds) 4789 4790 4791class FieldDefWithConditionMarkPropFieldDefstringnull(VegaLiteSchema): 4792 """FieldDefWithConditionMarkPropFieldDefstringnull schema wrapper 4793 4794 Mapping(required=[type]) 4795 A FieldDef with Condition :raw-html:`<ValueDef>` 4796 4797 Attributes 4798 ---------- 4799 4800 type : :class:`StandardType` 4801 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 4802 ``"ordinal"``, or ``"nominal"`` ). 4803 It can also be a ``"geojson"`` type for encoding `'geoshape' 4804 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 4805 4806 **Note:** 4807 4808 4809 * Data values for a temporal field can be either a date-time string (e.g., 4810 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 4811 timestamp number (e.g., ``1552199579097`` ). 4812 * Data ``type`` describes the semantics of the data rather than the primitive data 4813 types ( ``number``, ``string``, etc.). The same primitive data type can have 4814 different types of measurement. For example, numeric data can represent 4815 quantitative, ordinal, or nominal data. 4816 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 4817 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 4818 or `"ordinal" (for using an ordinal bin scale) 4819 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4820 * When using with `timeUnit 4821 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 4822 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 4823 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 4824 * When using with `aggregate 4825 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 4826 refers to the post-aggregation data type. For example, we can calculate count 4827 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 4828 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 4829 is ``"quantitative"``. 4830 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 4831 ``type`` as they have exactly the same type as their primary channels (e.g., 4832 ``x``, ``y`` ). 4833 4834 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 4835 documentation. 4836 aggregate : :class:`Aggregate` 4837 Aggregation function for the field 4838 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 4839 4840 **Default value:** ``undefined`` (None) 4841 4842 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 4843 documentation. 4844 bin : anyOf(boolean, :class:`BinParams`, None) 4845 A flag for binning a ``quantitative`` field, `an object defining binning parameters 4846 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 4847 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 4848 ``"binned"`` ). 4849 4850 4851 If ``true``, default `binning parameters 4852 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 4853 4854 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 4855 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 4856 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 4857 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 4858 set the axis's `tickMinStep 4859 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 4860 4861 **Default value:** ``false`` 4862 4863 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 4864 documentation. 4865 condition : anyOf(:class:`ConditionalStringValueDef`, 4866 List(:class:`ConditionalStringValueDef`)) 4867 One or more value definition(s) with `a selection or a test predicate 4868 <https://vega.github.io/vega-lite/docs/condition.html>`__. 4869 4870 **Note:** A field definition's ``condition`` property can only contain `conditional 4871 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 4872 since Vega-Lite only allows at most one encoded field per encoding channel. 4873 field : :class:`Field` 4874 **Required.** A string defining the name of the field from which to pull a data 4875 value 4876 or an object defining iterated values from the `repeat 4877 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 4878 4879 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 4880 documentation. 4881 4882 **Notes:** 4883 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 4884 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 4885 If field names contain dots or brackets but are not nested, you can use ``\\`` to 4886 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 4887 See more details about escaping in the `field documentation 4888 <https://vega.github.io/vega-lite/docs/field.html>`__. 4889 2) ``field`` is not required if ``aggregate`` is ``count``. 4890 legend : anyOf(:class:`Legend`, None) 4891 An object defining properties of the legend. 4892 If ``null``, the legend for the encoding channel will be removed. 4893 4894 **Default value:** If undefined, default `legend properties 4895 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 4896 4897 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 4898 documentation. 4899 scale : anyOf(:class:`Scale`, None) 4900 An object defining properties of the channel's scale, which is the function that 4901 transforms values in the data domain (numbers, dates, strings, etc) to visual values 4902 (pixels, colors, sizes) of the encoding channels. 4903 4904 If ``null``, the scale will be `disabled and the data value will be directly encoded 4905 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 4906 4907 **Default value:** If undefined, default `scale properties 4908 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 4909 4910 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 4911 documentation. 4912 sort : :class:`Sort` 4913 Sort order for the encoded field. 4914 4915 For continuous fields (quantitative or temporal), ``sort`` can be either 4916 ``"ascending"`` or ``"descending"``. 4917 4918 For discrete fields, ``sort`` can be one of the following: 4919 4920 4921 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 4922 Javascript. 4923 * `A sort-by-encoding definition 4924 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 4925 by another encoding channel. (This type of sort definition is not available for 4926 ``row`` and ``column`` channels.) 4927 * `A sort field definition 4928 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 4929 another field. 4930 * `An array specifying the field values in preferred order 4931 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 4932 sort order will obey the values in the array, followed by any unspecified values 4933 in their original order. For discrete time field, values in the sort array can be 4934 `date-time definition objects <types#datetime>`__. In addition, for time units 4935 ``"month"`` and ``"day"``, the values can be the month or day names (case 4936 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 4937 * ``null`` indicating no sort. 4938 4939 **Default value:** ``"ascending"`` 4940 4941 **Note:** ``null`` is not supported for ``row`` and ``column``. 4942 4943 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 4944 documentation. 4945 timeUnit : :class:`TimeUnit` 4946 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 4947 field. 4948 or `a temporal field that gets casted as ordinal 4949 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 4950 4951 **Default value:** ``undefined`` (None) 4952 4953 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 4954 documentation. 4955 title : anyOf(string, None) 4956 A title for the field. If ``null``, the title will be removed. 4957 4958 **Default value:** derived from the field's name and transformation function ( 4959 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 4960 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 4961 field is binned or has a time unit applied, the applied function is shown in 4962 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 4963 Otherwise, the title is simply the field name. 4964 4965 **Notes** : 4966 4967 1) You can customize the default field title format by providing the `fieldTitle 4968 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 4969 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 4970 function via the compile function's options 4971 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 4972 4973 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 4974 defined, axis/header/legend title will be used. 4975 """ 4976 _schema = {'$ref': '#/definitions/FieldDefWithCondition<MarkPropFieldDef,(string|null)>'} 4977 4978 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 4979 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 4980 title=Undefined, **kwds): 4981 super(FieldDefWithConditionMarkPropFieldDefstringnull, self).__init__(type=type, 4982 aggregate=aggregate, 4983 bin=bin, 4984 condition=condition, 4985 field=field, 4986 legend=legend, 4987 scale=scale, sort=sort, 4988 timeUnit=timeUnit, 4989 title=title, **kwds) 4990 4991 4992class FieldDefWithConditionTextFieldDefValue(VegaLiteSchema): 4993 """FieldDefWithConditionTextFieldDefValue schema wrapper 4994 4995 Mapping(required=[type]) 4996 A FieldDef with Condition :raw-html:`<ValueDef>` 4997 4998 Attributes 4999 ---------- 5000 5001 type : :class:`StandardType` 5002 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 5003 ``"ordinal"``, or ``"nominal"`` ). 5004 It can also be a ``"geojson"`` type for encoding `'geoshape' 5005 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 5006 5007 **Note:** 5008 5009 5010 * Data values for a temporal field can be either a date-time string (e.g., 5011 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 5012 timestamp number (e.g., ``1552199579097`` ). 5013 * Data ``type`` describes the semantics of the data rather than the primitive data 5014 types ( ``number``, ``string``, etc.). The same primitive data type can have 5015 different types of measurement. For example, numeric data can represent 5016 quantitative, ordinal, or nominal data. 5017 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 5018 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 5019 or `"ordinal" (for using an ordinal bin scale) 5020 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 5021 * When using with `timeUnit 5022 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 5023 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 5024 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 5025 * When using with `aggregate 5026 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 5027 refers to the post-aggregation data type. For example, we can calculate count 5028 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 5029 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 5030 is ``"quantitative"``. 5031 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 5032 ``type`` as they have exactly the same type as their primary channels (e.g., 5033 ``x``, ``y`` ). 5034 5035 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 5036 documentation. 5037 aggregate : :class:`Aggregate` 5038 Aggregation function for the field 5039 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 5040 5041 **Default value:** ``undefined`` (None) 5042 5043 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 5044 documentation. 5045 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 5046 A flag for binning a ``quantitative`` field, `an object defining binning parameters 5047 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 5048 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 5049 ``"binned"`` ). 5050 5051 5052 If ``true``, default `binning parameters 5053 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 5054 5055 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 5056 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 5057 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 5058 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 5059 set the axis's `tickMinStep 5060 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 5061 5062 **Default value:** ``false`` 5063 5064 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 5065 documentation. 5066 condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`)) 5067 One or more value definition(s) with `a selection or a test predicate 5068 <https://vega.github.io/vega-lite/docs/condition.html>`__. 5069 5070 **Note:** A field definition's ``condition`` property can only contain `conditional 5071 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 5072 since Vega-Lite only allows at most one encoded field per encoding channel. 5073 field : :class:`Field` 5074 **Required.** A string defining the name of the field from which to pull a data 5075 value 5076 or an object defining iterated values from the `repeat 5077 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 5078 5079 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 5080 documentation. 5081 5082 **Notes:** 5083 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 5084 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 5085 If field names contain dots or brackets but are not nested, you can use ``\\`` to 5086 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 5087 See more details about escaping in the `field documentation 5088 <https://vega.github.io/vega-lite/docs/field.html>`__. 5089 2) ``field`` is not required if ``aggregate`` is ``count``. 5090 format : string 5091 The text formatting pattern for labels of guides (axes, legends, headers) and text 5092 marks. 5093 5094 5095 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 5096 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 5097 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 5098 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 5099 5100 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 5101 for more examples. 5102 5103 **Default value:** Derived from `numberFormat 5104 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 5105 format and from `timeFormat 5106 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 5107 format. 5108 formatType : enum('number', 'time') 5109 The format type for labels ( ``"number"`` or ``"time"`` ). 5110 5111 **Default value:** 5112 5113 5114 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 5115 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 5116 ``timeUnit``. 5117 timeUnit : :class:`TimeUnit` 5118 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 5119 field. 5120 or `a temporal field that gets casted as ordinal 5121 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 5122 5123 **Default value:** ``undefined`` (None) 5124 5125 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 5126 documentation. 5127 title : anyOf(string, None) 5128 A title for the field. If ``null``, the title will be removed. 5129 5130 **Default value:** derived from the field's name and transformation function ( 5131 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 5132 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 5133 field is binned or has a time unit applied, the applied function is shown in 5134 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 5135 Otherwise, the title is simply the field name. 5136 5137 **Notes** : 5138 5139 1) You can customize the default field title format by providing the `fieldTitle 5140 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 5141 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 5142 function via the compile function's options 5143 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 5144 5145 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 5146 defined, axis/header/legend title will be used. 5147 """ 5148 _schema = {'$ref': '#/definitions/FieldDefWithCondition<TextFieldDef,Value>'} 5149 5150 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 5151 field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined, 5152 title=Undefined, **kwds): 5153 super(FieldDefWithConditionTextFieldDefValue, self).__init__(type=type, aggregate=aggregate, 5154 bin=bin, condition=condition, 5155 field=field, format=format, 5156 formatType=formatType, 5157 timeUnit=timeUnit, title=title, 5158 **kwds) 5159 5160 5161class FieldDefWithoutScale(VegaLiteSchema): 5162 """FieldDefWithoutScale schema wrapper 5163 5164 Mapping(required=[type]) 5165 Definition object for a data field, its type and transformation of an encoding channel. 5166 5167 Attributes 5168 ---------- 5169 5170 type : :class:`StandardType` 5171 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 5172 ``"ordinal"``, or ``"nominal"`` ). 5173 It can also be a ``"geojson"`` type for encoding `'geoshape' 5174 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 5175 5176 **Note:** 5177 5178 5179 * Data values for a temporal field can be either a date-time string (e.g., 5180 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 5181 timestamp number (e.g., ``1552199579097`` ). 5182 * Data ``type`` describes the semantics of the data rather than the primitive data 5183 types ( ``number``, ``string``, etc.). The same primitive data type can have 5184 different types of measurement. For example, numeric data can represent 5185 quantitative, ordinal, or nominal data. 5186 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 5187 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 5188 or `"ordinal" (for using an ordinal bin scale) 5189 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 5190 * When using with `timeUnit 5191 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 5192 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 5193 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 5194 * When using with `aggregate 5195 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 5196 refers to the post-aggregation data type. For example, we can calculate count 5197 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 5198 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 5199 is ``"quantitative"``. 5200 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 5201 ``type`` as they have exactly the same type as their primary channels (e.g., 5202 ``x``, ``y`` ). 5203 5204 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 5205 documentation. 5206 aggregate : :class:`Aggregate` 5207 Aggregation function for the field 5208 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 5209 5210 **Default value:** ``undefined`` (None) 5211 5212 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 5213 documentation. 5214 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 5215 A flag for binning a ``quantitative`` field, `an object defining binning parameters 5216 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 5217 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 5218 ``"binned"`` ). 5219 5220 5221 If ``true``, default `binning parameters 5222 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 5223 5224 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 5225 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 5226 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 5227 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 5228 set the axis's `tickMinStep 5229 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 5230 5231 **Default value:** ``false`` 5232 5233 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 5234 documentation. 5235 field : :class:`Field` 5236 **Required.** A string defining the name of the field from which to pull a data 5237 value 5238 or an object defining iterated values from the `repeat 5239 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 5240 5241 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 5242 documentation. 5243 5244 **Notes:** 5245 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 5246 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 5247 If field names contain dots or brackets but are not nested, you can use ``\\`` to 5248 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 5249 See more details about escaping in the `field documentation 5250 <https://vega.github.io/vega-lite/docs/field.html>`__. 5251 2) ``field`` is not required if ``aggregate`` is ``count``. 5252 timeUnit : :class:`TimeUnit` 5253 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 5254 field. 5255 or `a temporal field that gets casted as ordinal 5256 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 5257 5258 **Default value:** ``undefined`` (None) 5259 5260 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 5261 documentation. 5262 title : anyOf(string, None) 5263 A title for the field. If ``null``, the title will be removed. 5264 5265 **Default value:** derived from the field's name and transformation function ( 5266 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 5267 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 5268 field is binned or has a time unit applied, the applied function is shown in 5269 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 5270 Otherwise, the title is simply the field name. 5271 5272 **Notes** : 5273 5274 1) You can customize the default field title format by providing the `fieldTitle 5275 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 5276 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 5277 function via the compile function's options 5278 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 5279 5280 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 5281 defined, axis/header/legend title will be used. 5282 """ 5283 _schema = {'$ref': '#/definitions/FieldDefWithoutScale'} 5284 5285 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined, 5286 timeUnit=Undefined, title=Undefined, **kwds): 5287 super(FieldDefWithoutScale, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field, 5288 timeUnit=timeUnit, title=title, **kwds) 5289 5290 5291class FieldName(Field): 5292 """FieldName schema wrapper 5293 5294 string 5295 """ 5296 _schema = {'$ref': '#/definitions/FieldName'} 5297 5298 def __init__(self, *args): 5299 super(FieldName, self).__init__(*args) 5300 5301 5302class FontStyle(VegaLiteSchema): 5303 """FontStyle schema wrapper 5304 5305 string 5306 """ 5307 _schema = {'$ref': '#/definitions/FontStyle'} 5308 5309 def __init__(self, *args): 5310 super(FontStyle, self).__init__(*args) 5311 5312 5313class FontWeight(VegaLiteSchema): 5314 """FontWeight schema wrapper 5315 5316 enum('normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900) 5317 """ 5318 _schema = {'$ref': '#/definitions/FontWeight'} 5319 5320 def __init__(self, *args): 5321 super(FontWeight, self).__init__(*args) 5322 5323 5324class Generator(Data): 5325 """Generator schema wrapper 5326 5327 anyOf(:class:`SequenceGenerator`, :class:`SphereGenerator`, :class:`GraticuleGenerator`) 5328 """ 5329 _schema = {'$ref': '#/definitions/Generator'} 5330 5331 def __init__(self, *args, **kwds): 5332 super(Generator, self).__init__(*args, **kwds) 5333 5334 5335class GenericUnitSpecEncodingAnyMark(VegaLiteSchema): 5336 """GenericUnitSpecEncodingAnyMark schema wrapper 5337 5338 Mapping(required=[mark]) 5339 Base interface for a unit (single-view) specification. 5340 5341 Attributes 5342 ---------- 5343 5344 mark : :class:`AnyMark` 5345 A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, 5346 ``"tick"``, ``"line"``, 5347 ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark 5348 definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. 5349 data : anyOf(:class:`Data`, None) 5350 An object describing the data source. Set to ``null`` to ignore the parent's data 5351 source. If no data is set, it is derived from the parent. 5352 description : string 5353 Description of this mark for commenting purpose. 5354 encoding : :class:`Encoding` 5355 A key-value mapping between encoding channels and definition of fields. 5356 height : float 5357 The height of a visualization. 5358 5359 **Default value:** 5360 5361 5362 * If a view's `autosize 5363 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 5364 its y-channel has a `continuous scale 5365 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will 5366 be the value of `config.view.height 5367 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 5368 * For y-axis with a band or point scale: if `rangeStep 5369 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 5370 unspecified, the height is `determined by the range step, paddings, and the 5371 cardinality of the field mapped to y-channel 5372 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 5373 ``rangeStep`` is ``null``, the height will be the value of `config.view.height 5374 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 5375 * If no field is mapped to ``y`` channel, the ``height`` will be the value of 5376 ``rangeStep``. 5377 5378 **Note** : For plots with `row and column channels 5379 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 5380 height of a single view. 5381 5382 **See also:** The documentation for `width and height 5383 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 5384 name : string 5385 Name of the visualization for later reference. 5386 projection : :class:`Projection` 5387 An object defining properties of geographic projection, which will be applied to 5388 ``shape`` path for ``"geoshape"`` marks 5389 and to ``latitude`` and ``"longitude"`` channels for other marks. 5390 selection : Mapping(required=[]) 5391 A key-value mapping between selection names and definitions. 5392 title : anyOf(string, :class:`TitleParams`) 5393 Title for the plot. 5394 transform : List(:class:`Transform`) 5395 An array of data transformations such as filter and new field calculation. 5396 view : :class:`ViewBackground` 5397 An object defining the view background's fill and stroke. 5398 5399 **Default value:** none (transparent) 5400 width : float 5401 The width of a visualization. 5402 5403 **Default value:** This will be determined by the following rules: 5404 5405 5406 * If a view's `autosize 5407 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 5408 its x-channel has a `continuous scale 5409 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will 5410 be the value of `config.view.width 5411 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 5412 * For x-axis with a band or point scale: if `rangeStep 5413 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 5414 unspecified, the width is `determined by the range step, paddings, and the 5415 cardinality of the field mapped to x-channel 5416 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 5417 ``rangeStep`` is ``null``, the width will be the value of `config.view.width 5418 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 5419 * If no field is mapped to ``x`` channel, the ``width`` will be the value of 5420 `config.scale.textXRangeStep 5421 <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for 5422 ``text`` mark and the value of ``rangeStep`` for other marks. 5423 5424 **Note:** For plots with `row and column channels 5425 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 5426 width of a single view. 5427 5428 **See also:** The documentation for `width and height 5429 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 5430 """ 5431 _schema = {'$ref': '#/definitions/GenericUnitSpec<Encoding,AnyMark>'} 5432 5433 def __init__(self, mark=Undefined, data=Undefined, description=Undefined, encoding=Undefined, 5434 height=Undefined, name=Undefined, projection=Undefined, selection=Undefined, 5435 title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds): 5436 super(GenericUnitSpecEncodingAnyMark, self).__init__(mark=mark, data=data, 5437 description=description, encoding=encoding, 5438 height=height, name=name, 5439 projection=projection, selection=selection, 5440 title=title, transform=transform, 5441 view=view, width=width, **kwds) 5442 5443 5444class GraticuleGenerator(Generator): 5445 """GraticuleGenerator schema wrapper 5446 5447 Mapping(required=[graticule]) 5448 5449 Attributes 5450 ---------- 5451 5452 graticule : anyOf(enum(True), :class:`GraticuleParams`) 5453 Generate graticule GeoJSON data for geographic reference lines. 5454 name : string 5455 Provide a placeholder name and bind data at runtime. 5456 """ 5457 _schema = {'$ref': '#/definitions/GraticuleGenerator'} 5458 5459 def __init__(self, graticule=Undefined, name=Undefined, **kwds): 5460 super(GraticuleGenerator, self).__init__(graticule=graticule, name=name, **kwds) 5461 5462 5463class GraticuleParams(VegaLiteSchema): 5464 """GraticuleParams schema wrapper 5465 5466 Mapping(required=[]) 5467 5468 Attributes 5469 ---------- 5470 5471 extent : List(List(float)) 5472 Sets both the major and minor extents to the same values. 5473 extentMajor : List(List(float)) 5474 The major extent of the graticule as a two-element array of coordinates. 5475 extentMinor : List(List(float)) 5476 The minor extent of the graticule as a two-element array of coordinates. 5477 precision : float 5478 The precision of the graticule in degrees. 5479 5480 **Default value:** ``2.5`` 5481 step : List(float) 5482 Sets both the major and minor step angles to the same values. 5483 stepMajor : List(float) 5484 The major step angles of the graticule. 5485 5486 **Default value:** ``[90, 360]`` 5487 stepMinor : List(float) 5488 The minor step angles of the graticule. 5489 5490 **Default value:** ``[10, 10]`` 5491 """ 5492 _schema = {'$ref': '#/definitions/GraticuleParams'} 5493 5494 def __init__(self, extent=Undefined, extentMajor=Undefined, extentMinor=Undefined, 5495 precision=Undefined, step=Undefined, stepMajor=Undefined, stepMinor=Undefined, **kwds): 5496 super(GraticuleParams, self).__init__(extent=extent, extentMajor=extentMajor, 5497 extentMinor=extentMinor, precision=precision, step=step, 5498 stepMajor=stepMajor, stepMinor=stepMinor, **kwds) 5499 5500 5501class Header(VegaLiteSchema): 5502 """Header schema wrapper 5503 5504 Mapping(required=[]) 5505 Headers of row / column channels for faceted plots. 5506 5507 Attributes 5508 ---------- 5509 5510 format : string 5511 The text formatting pattern for labels of guides (axes, legends, headers) and text 5512 marks. 5513 5514 5515 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 5516 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 5517 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 5518 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 5519 5520 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 5521 for more examples. 5522 5523 **Default value:** Derived from `numberFormat 5524 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 5525 format and from `timeFormat 5526 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 5527 format. 5528 formatType : enum('number', 'time') 5529 The format type for labels ( ``"number"`` or ``"time"`` ). 5530 5531 **Default value:** 5532 5533 5534 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 5535 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 5536 ``timeUnit``. 5537 labelAlign : :class:`Align` 5538 Horizontal text alignment of header labels. 5539 labelAnchor : :class:`TitleAnchor` 5540 The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or 5541 ``"end"``. For example, with a label orientation of top these anchor positions map 5542 to a left-, center-, or right-aligned label. 5543 labelAngle : float 5544 The rotation angle of the header labels. 5545 5546 **Default value:** ``0`` for column header, ``-90`` for row header. 5547 labelColor : :class:`Color` 5548 The color of the header label, can be in hex color code or regular color name. 5549 labelFont : string 5550 The font of the header label. 5551 labelFontSize : float 5552 The font size of the header label, in pixels. 5553 labelFontStyle : :class:`FontStyle` 5554 The font style of the header label. 5555 labelLimit : float 5556 The maximum length of the header label in pixels. The text value will be 5557 automatically truncated if the rendered size exceeds the limit. 5558 5559 **Default value:** ``0``, indicating no limit 5560 labelOrient : :class:`Orient` 5561 The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or 5562 ``"right"``. 5563 labelPadding : float 5564 The padding, in pixel, between facet header's label and the plot. 5565 5566 **Default value:** ``10`` 5567 labels : boolean 5568 A boolean flag indicating if labels should be included as part of the header. 5569 5570 **Default value:** ``true``. 5571 title : anyOf(string, None) 5572 A title for the field. If ``null``, the title will be removed. 5573 5574 **Default value:** derived from the field's name and transformation function ( 5575 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 5576 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 5577 field is binned or has a time unit applied, the applied function is shown in 5578 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 5579 Otherwise, the title is simply the field name. 5580 5581 **Notes** : 5582 5583 1) You can customize the default field title format by providing the `fieldTitle 5584 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 5585 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 5586 function via the compile function's options 5587 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 5588 5589 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 5590 defined, axis/header/legend title will be used. 5591 titleAlign : :class:`Align` 5592 Horizontal text alignment (to the anchor) of header titles. 5593 titleAnchor : :class:`TitleAnchor` 5594 The anchor position for placing the title. One of ``"start"``, ``"middle"``, or 5595 ``"end"``. For example, with an orientation of top these anchor positions map to a 5596 left-, center-, or right-aligned title. 5597 titleAngle : float 5598 The rotation angle of the header title. 5599 5600 **Default value:** ``0``. 5601 titleBaseline : :class:`TextBaseline` 5602 Vertical text baseline for the header title. One of ``"top"``, ``"bottom"``, 5603 ``"middle"``. 5604 5605 **Default value:** ``"middle"`` 5606 titleColor : :class:`Color` 5607 Color of the header title, can be in hex color code or regular color name. 5608 titleFont : string 5609 Font of the header title. (e.g., ``"Helvetica Neue"`` ). 5610 titleFontSize : float 5611 Font size of the header title. 5612 titleFontStyle : :class:`FontStyle` 5613 The font style of the header title. 5614 titleFontWeight : :class:`FontWeight` 5615 Font weight of the header title. 5616 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 5617 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 5618 ). 5619 titleLimit : float 5620 The maximum length of the header title in pixels. The text value will be 5621 automatically truncated if the rendered size exceeds the limit. 5622 5623 **Default value:** ``0``, indicating no limit 5624 titleOrient : :class:`Orient` 5625 The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or 5626 ``"right"``. 5627 titlePadding : float 5628 The padding, in pixel, between facet header's title and the label. 5629 5630 **Default value:** ``10`` 5631 """ 5632 _schema = {'$ref': '#/definitions/Header'} 5633 5634 def __init__(self, format=Undefined, formatType=Undefined, labelAlign=Undefined, 5635 labelAnchor=Undefined, labelAngle=Undefined, labelColor=Undefined, labelFont=Undefined, 5636 labelFontSize=Undefined, labelFontStyle=Undefined, labelLimit=Undefined, 5637 labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, title=Undefined, 5638 titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, 5639 titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, 5640 titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, 5641 titleLimit=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds): 5642 super(Header, self).__init__(format=format, formatType=formatType, labelAlign=labelAlign, 5643 labelAnchor=labelAnchor, labelAngle=labelAngle, 5644 labelColor=labelColor, labelFont=labelFont, 5645 labelFontSize=labelFontSize, labelFontStyle=labelFontStyle, 5646 labelLimit=labelLimit, labelOrient=labelOrient, 5647 labelPadding=labelPadding, labels=labels, title=title, 5648 titleAlign=titleAlign, titleAnchor=titleAnchor, 5649 titleAngle=titleAngle, titleBaseline=titleBaseline, 5650 titleColor=titleColor, titleFont=titleFont, 5651 titleFontSize=titleFontSize, titleFontStyle=titleFontStyle, 5652 titleFontWeight=titleFontWeight, titleLimit=titleLimit, 5653 titleOrient=titleOrient, titlePadding=titlePadding, **kwds) 5654 5655 5656class HeaderConfig(VegaLiteSchema): 5657 """HeaderConfig schema wrapper 5658 5659 Mapping(required=[]) 5660 5661 Attributes 5662 ---------- 5663 5664 format : string 5665 The text formatting pattern for labels of guides (axes, legends, headers) and text 5666 marks. 5667 5668 5669 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 5670 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 5671 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 5672 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 5673 5674 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 5675 for more examples. 5676 5677 **Default value:** Derived from `numberFormat 5678 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 5679 format and from `timeFormat 5680 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 5681 format. 5682 formatType : enum('number', 'time') 5683 The format type for labels ( ``"number"`` or ``"time"`` ). 5684 5685 **Default value:** 5686 5687 5688 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 5689 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 5690 ``timeUnit``. 5691 labelAlign : :class:`Align` 5692 Horizontal text alignment of header labels. 5693 labelAnchor : :class:`TitleAnchor` 5694 The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or 5695 ``"end"``. For example, with a label orientation of top these anchor positions map 5696 to a left-, center-, or right-aligned label. 5697 labelAngle : float 5698 The rotation angle of the header labels. 5699 5700 **Default value:** ``0`` for column header, ``-90`` for row header. 5701 labelColor : :class:`Color` 5702 The color of the header label, can be in hex color code or regular color name. 5703 labelFont : string 5704 The font of the header label. 5705 labelFontSize : float 5706 The font size of the header label, in pixels. 5707 labelFontStyle : :class:`FontStyle` 5708 The font style of the header label. 5709 labelLimit : float 5710 The maximum length of the header label in pixels. The text value will be 5711 automatically truncated if the rendered size exceeds the limit. 5712 5713 **Default value:** ``0``, indicating no limit 5714 labelOrient : :class:`Orient` 5715 The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or 5716 ``"right"``. 5717 labelPadding : float 5718 The padding, in pixel, between facet header's label and the plot. 5719 5720 **Default value:** ``10`` 5721 labels : boolean 5722 A boolean flag indicating if labels should be included as part of the header. 5723 5724 **Default value:** ``true``. 5725 shortTimeLabels : boolean 5726 Whether month names and weekday names should be abbreviated. 5727 5728 **Default value:** ``false`` 5729 title : None 5730 Set to null to disable title for the axis, legend, or header. 5731 titleAlign : :class:`Align` 5732 Horizontal text alignment (to the anchor) of header titles. 5733 titleAnchor : :class:`TitleAnchor` 5734 The anchor position for placing the title. One of ``"start"``, ``"middle"``, or 5735 ``"end"``. For example, with an orientation of top these anchor positions map to a 5736 left-, center-, or right-aligned title. 5737 titleAngle : float 5738 The rotation angle of the header title. 5739 5740 **Default value:** ``0``. 5741 titleBaseline : :class:`TextBaseline` 5742 Vertical text baseline for the header title. One of ``"top"``, ``"bottom"``, 5743 ``"middle"``. 5744 5745 **Default value:** ``"middle"`` 5746 titleColor : :class:`Color` 5747 Color of the header title, can be in hex color code or regular color name. 5748 titleFont : string 5749 Font of the header title. (e.g., ``"Helvetica Neue"`` ). 5750 titleFontSize : float 5751 Font size of the header title. 5752 titleFontStyle : :class:`FontStyle` 5753 The font style of the header title. 5754 titleFontWeight : :class:`FontWeight` 5755 Font weight of the header title. 5756 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 5757 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 5758 ). 5759 titleLimit : float 5760 The maximum length of the header title in pixels. The text value will be 5761 automatically truncated if the rendered size exceeds the limit. 5762 5763 **Default value:** ``0``, indicating no limit 5764 titleOrient : :class:`Orient` 5765 The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or 5766 ``"right"``. 5767 titlePadding : float 5768 The padding, in pixel, between facet header's title and the label. 5769 5770 **Default value:** ``10`` 5771 """ 5772 _schema = {'$ref': '#/definitions/HeaderConfig'} 5773 5774 def __init__(self, format=Undefined, formatType=Undefined, labelAlign=Undefined, 5775 labelAnchor=Undefined, labelAngle=Undefined, labelColor=Undefined, labelFont=Undefined, 5776 labelFontSize=Undefined, labelFontStyle=Undefined, labelLimit=Undefined, 5777 labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, 5778 shortTimeLabels=Undefined, title=Undefined, titleAlign=Undefined, 5779 titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, 5780 titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, 5781 titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, 5782 titleOrient=Undefined, titlePadding=Undefined, **kwds): 5783 super(HeaderConfig, self).__init__(format=format, formatType=formatType, labelAlign=labelAlign, 5784 labelAnchor=labelAnchor, labelAngle=labelAngle, 5785 labelColor=labelColor, labelFont=labelFont, 5786 labelFontSize=labelFontSize, labelFontStyle=labelFontStyle, 5787 labelLimit=labelLimit, labelOrient=labelOrient, 5788 labelPadding=labelPadding, labels=labels, 5789 shortTimeLabels=shortTimeLabels, title=title, 5790 titleAlign=titleAlign, titleAnchor=titleAnchor, 5791 titleAngle=titleAngle, titleBaseline=titleBaseline, 5792 titleColor=titleColor, titleFont=titleFont, 5793 titleFontSize=titleFontSize, titleFontStyle=titleFontStyle, 5794 titleFontWeight=titleFontWeight, titleLimit=titleLimit, 5795 titleOrient=titleOrient, titlePadding=titlePadding, **kwds) 5796 5797 5798class HexColor(Color): 5799 """HexColor schema wrapper 5800 5801 string 5802 """ 5803 _schema = {'$ref': '#/definitions/HexColor'} 5804 5805 def __init__(self, *args): 5806 super(HexColor, self).__init__(*args) 5807 5808 5809class ImputeMethod(VegaLiteSchema): 5810 """ImputeMethod schema wrapper 5811 5812 enum('value', 'median', 'max', 'min', 'mean') 5813 """ 5814 _schema = {'$ref': '#/definitions/ImputeMethod'} 5815 5816 def __init__(self, *args): 5817 super(ImputeMethod, self).__init__(*args) 5818 5819 5820class ImputeParams(VegaLiteSchema): 5821 """ImputeParams schema wrapper 5822 5823 Mapping(required=[]) 5824 5825 Attributes 5826 ---------- 5827 5828 frame : List(anyOf(None, float)) 5829 A frame specification as a two-element array used to control the window over which 5830 the specified method is applied. The array entries should either be a number 5831 indicating the offset from the current data object, or null to indicate unbounded 5832 rows preceding or following the current data object. For example, the value ``[-5, 5833 5]`` indicates that the window should include five objects preceding and five 5834 objects following the current object. 5835 5836 **Default value:** : ``[null, null]`` indicating that the window includes all 5837 objects. 5838 keyvals : anyOf(List(Any), :class:`ImputeSequence`) 5839 Defines the key values that should be considered for imputation. 5840 An array of key values or an object defining a `number sequence 5841 <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__. 5842 5843 If provided, this will be used in addition to the key values observed within the 5844 input data. If not provided, the values will be derived from all unique values of 5845 the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if 5846 the y-field is imputed, or vice versa. 5847 5848 If there is no impute grouping, this property *must* be specified. 5849 method : :class:`ImputeMethod` 5850 The imputation method to use for the field value of imputed data objects. 5851 One of ``value``, ``mean``, ``median``, ``max`` or ``min``. 5852 5853 **Default value:** ``"value"`` 5854 value : Any 5855 The field value to use when the imputation ``method`` is ``"value"``. 5856 """ 5857 _schema = {'$ref': '#/definitions/ImputeParams'} 5858 5859 def __init__(self, frame=Undefined, keyvals=Undefined, method=Undefined, value=Undefined, **kwds): 5860 super(ImputeParams, self).__init__(frame=frame, keyvals=keyvals, method=method, value=value, 5861 **kwds) 5862 5863 5864class ImputeSequence(VegaLiteSchema): 5865 """ImputeSequence schema wrapper 5866 5867 Mapping(required=[stop]) 5868 5869 Attributes 5870 ---------- 5871 5872 stop : float 5873 The ending value(exclusive) of the sequence. 5874 start : float 5875 The starting value of the sequence. 5876 **Default value:** ``0`` 5877 step : float 5878 The step value between sequence entries. 5879 **Default value:** ``1`` or ``-1`` if ``stop < start`` 5880 """ 5881 _schema = {'$ref': '#/definitions/ImputeSequence'} 5882 5883 def __init__(self, stop=Undefined, start=Undefined, step=Undefined, **kwds): 5884 super(ImputeSequence, self).__init__(stop=stop, start=start, step=step, **kwds) 5885 5886 5887class InlineData(DataSource): 5888 """InlineData schema wrapper 5889 5890 Mapping(required=[values]) 5891 5892 Attributes 5893 ---------- 5894 5895 values : :class:`InlineDataset` 5896 The full data set, included inline. This can be an array of objects or primitive 5897 values, an object, or a string. 5898 Arrays of primitive values are ingested as objects with a ``data`` property. Strings 5899 are parsed according to the specified format type. 5900 format : :class:`DataFormat` 5901 An object that specifies the format for parsing the data. 5902 name : string 5903 Provide a placeholder name and bind data at runtime. 5904 """ 5905 _schema = {'$ref': '#/definitions/InlineData'} 5906 5907 def __init__(self, values=Undefined, format=Undefined, name=Undefined, **kwds): 5908 super(InlineData, self).__init__(values=values, format=format, name=name, **kwds) 5909 5910 5911class InlineDataset(VegaLiteSchema): 5912 """InlineDataset schema wrapper 5913 5914 anyOf(List(float), List(string), List(boolean), List(Mapping(required=[])), string, 5915 Mapping(required=[])) 5916 """ 5917 _schema = {'$ref': '#/definitions/InlineDataset'} 5918 5919 def __init__(self, *args, **kwds): 5920 super(InlineDataset, self).__init__(*args, **kwds) 5921 5922 5923class InputBinding(Binding): 5924 """InputBinding schema wrapper 5925 5926 Mapping(required=[]) 5927 5928 Attributes 5929 ---------- 5930 5931 autocomplete : string 5932 5933 debounce : float 5934 5935 element : :class:`Element` 5936 5937 input : string 5938 5939 name : string 5940 5941 placeholder : string 5942 5943 type : string 5944 5945 """ 5946 _schema = {'$ref': '#/definitions/InputBinding'} 5947 5948 def __init__(self, autocomplete=Undefined, debounce=Undefined, element=Undefined, input=Undefined, 5949 name=Undefined, placeholder=Undefined, type=Undefined, **kwds): 5950 super(InputBinding, self).__init__(autocomplete=autocomplete, debounce=debounce, 5951 element=element, input=input, name=name, 5952 placeholder=placeholder, type=type, **kwds) 5953 5954 5955class Interpolate(VegaLiteSchema): 5956 """Interpolate schema wrapper 5957 5958 enum('linear', 'linear-closed', 'step', 'step-before', 'step-after', 'basis', 'basis-open', 5959 'basis-closed', 'cardinal', 'cardinal-open', 'cardinal-closed', 'bundle', 'monotone') 5960 """ 5961 _schema = {'$ref': '#/definitions/Interpolate'} 5962 5963 def __init__(self, *args): 5964 super(Interpolate, self).__init__(*args) 5965 5966 5967class IntervalSelectionConfig(VegaLiteSchema): 5968 """IntervalSelectionConfig schema wrapper 5969 5970 Mapping(required=[]) 5971 5972 Attributes 5973 ---------- 5974 5975 bind : enum('scales') 5976 Establishes a two-way binding between the interval selection and the scales 5977 used within the same view. This allows a user to interactively pan and 5978 zoom the view. 5979 5980 **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__ 5981 documentation. 5982 clear : anyOf(:class:`EventStream`, boolean) 5983 Clears the selection, emptying it of all values. Can be an 5984 `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to 5985 disable. 5986 5987 **Default value:** ``dblclick``. 5988 5989 **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__ 5990 documentation. 5991 empty : enum('all', 'none') 5992 By default, ``all`` data values are considered to lie within an empty selection. 5993 When set to ``none``, empty selections contain no data values. 5994 encodings : List(:class:`SingleDefUnitChannel`) 5995 An array of encoding channels. The corresponding data field values 5996 must match for a data tuple to fall within the selection. 5997 5998 **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__ 5999 documentation. 6000 fields : List(:class:`FieldName`) 6001 An array of field names whose values must match for a data tuple to 6002 fall within the selection. 6003 6004 **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__ 6005 documentation. 6006 init : :class:`SelectionInitIntervalMapping` 6007 Initialize the selection with a mapping between `projected channels or field names 6008 <https://vega.github.io/vega-lite/docs/project.html>`__ and arrays of 6009 initial values. 6010 6011 **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__ 6012 documentation. 6013 mark : :class:`BrushConfig` 6014 An interval selection also adds a rectangle mark to depict the 6015 extents of the interval. The ``mark`` property can be used to customize the 6016 appearance of the mark. 6017 6018 **See also:** `mark <https://vega.github.io/vega-lite/docs/selection-mark.html>`__ 6019 documentation. 6020 on : :class:`EventStream` 6021 A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or 6022 selector) that triggers the selection. 6023 For interval selections, the event stream must specify a `start and end 6024 <https://vega.github.io/vega/docs/event-streams/#between-filters>`__. 6025 resolve : :class:`SelectionResolution` 6026 With layered and multi-view displays, a strategy that determines how 6027 selections' data queries are resolved when applied in a filter transform, 6028 conditional encoding rule, or scale domain. 6029 6030 **See also:** `resolve 6031 <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation. 6032 translate : anyOf(string, boolean) 6033 When truthy, allows a user to interactively move an interval selection 6034 back-and-forth. Can be ``true``, ``false`` (to disable panning), or a 6035 `Vega event stream definition <https://vega.github.io/vega/docs/event-streams/>`__ 6036 which must include a start and end event to trigger continuous panning. 6037 6038 **Default value:** ``true``, which corresponds to 6039 ``[mousedown, window:mouseup] > window:mousemove!`` which corresponds to 6040 clicks and dragging within an interval selection to reposition it. 6041 6042 **See also:** `translate <https://vega.github.io/vega-lite/docs/translate.html>`__ 6043 documentation. 6044 zoom : anyOf(string, boolean) 6045 When truthy, allows a user to interactively resize an interval selection. 6046 Can be ``true``, ``false`` (to disable zooming), or a `Vega event stream 6047 definition <https://vega.github.io/vega/docs/event-streams/>`__. Currently, 6048 only ``wheel`` events are supported. 6049 6050 **Default value:** ``true``, which corresponds to ``wheel!``. 6051 6052 **See also:** `zoom <https://vega.github.io/vega-lite/docs/zoom.html>`__ 6053 documentation. 6054 """ 6055 _schema = {'$ref': '#/definitions/IntervalSelectionConfig'} 6056 6057 def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined, 6058 fields=Undefined, init=Undefined, mark=Undefined, on=Undefined, resolve=Undefined, 6059 translate=Undefined, zoom=Undefined, **kwds): 6060 super(IntervalSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty, 6061 encodings=encodings, fields=fields, init=init, 6062 mark=mark, on=on, resolve=resolve, 6063 translate=translate, zoom=zoom, **kwds) 6064 6065 6066class JoinAggregateFieldDef(VegaLiteSchema): 6067 """JoinAggregateFieldDef schema wrapper 6068 6069 Mapping(required=[op, as]) 6070 6071 Attributes 6072 ---------- 6073 6074 op : :class:`AggregateOp` 6075 The aggregation operation to apply (e.g., sum, average or count). See the list of 6076 all supported operations `here 6077 <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__. 6078 field : :class:`FieldName` 6079 The data field for which to compute the aggregate function. This can be omitted for 6080 functions that do not operate over a field such as ``count``. 6081 as : :class:`FieldName` 6082 The output name for the join aggregate operation. 6083 """ 6084 _schema = {'$ref': '#/definitions/JoinAggregateFieldDef'} 6085 6086 def __init__(self, op=Undefined, field=Undefined, **kwds): 6087 super(JoinAggregateFieldDef, self).__init__(op=op, field=field, **kwds) 6088 6089 6090class JsonDataFormat(DataFormat): 6091 """JsonDataFormat schema wrapper 6092 6093 Mapping(required=[]) 6094 6095 Attributes 6096 ---------- 6097 6098 parse : anyOf(:class:`Parse`, None) 6099 If set to ``null``, disable type inference based on the spec and only use type 6100 inference based on the data. 6101 Alternatively, a parsing directive object can be provided for explicit data types. 6102 Each property of the object corresponds to a field name, and the value to the 6103 desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not 6104 parse the field)). 6105 For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field 6106 in each input record a Date value. 6107 6108 For ``"date"``, we parse data based using Javascript's `Date.parse() 6109 <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__. 6110 For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using 6111 the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__. 6112 UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ). 6113 See more about `UTC time 6114 <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__ 6115 property : string 6116 The JSON property containing the desired data. 6117 This parameter can be used when the loaded JSON file may have surrounding structure 6118 or meta-data. 6119 For example ``"property": "values.features"`` is equivalent to retrieving 6120 ``json.values.features`` 6121 from the loaded JSON object. 6122 type : enum('json') 6123 Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. 6124 6125 **Default value:** The default format type is determined by the extension of the 6126 file URL. 6127 If no extension is detected, ``"json"`` will be used by default. 6128 """ 6129 _schema = {'$ref': '#/definitions/JsonDataFormat'} 6130 6131 def __init__(self, parse=Undefined, property=Undefined, type=Undefined, **kwds): 6132 super(JsonDataFormat, self).__init__(parse=parse, property=property, type=type, **kwds) 6133 6134 6135class LabelOverlap(VegaLiteSchema): 6136 """LabelOverlap schema wrapper 6137 6138 anyOf(boolean, enum('parity'), enum('greedy')) 6139 """ 6140 _schema = {'$ref': '#/definitions/LabelOverlap'} 6141 6142 def __init__(self, *args, **kwds): 6143 super(LabelOverlap, self).__init__(*args, **kwds) 6144 6145 6146class LatLongFieldDef(VegaLiteSchema): 6147 """LatLongFieldDef schema wrapper 6148 6149 Mapping(required=[]) 6150 6151 Attributes 6152 ---------- 6153 6154 aggregate : :class:`Aggregate` 6155 Aggregation function for the field 6156 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 6157 6158 **Default value:** ``undefined`` (None) 6159 6160 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 6161 documentation. 6162 bin : None 6163 A flag for binning a ``quantitative`` field, `an object defining binning parameters 6164 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 6165 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 6166 ``"binned"`` ). 6167 6168 6169 If ``true``, default `binning parameters 6170 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 6171 6172 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 6173 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 6174 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 6175 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 6176 set the axis's `tickMinStep 6177 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 6178 6179 **Default value:** ``false`` 6180 6181 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 6182 documentation. 6183 field : :class:`Field` 6184 **Required.** A string defining the name of the field from which to pull a data 6185 value 6186 or an object defining iterated values from the `repeat 6187 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 6188 6189 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 6190 documentation. 6191 6192 **Notes:** 6193 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 6194 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 6195 If field names contain dots or brackets but are not nested, you can use ``\\`` to 6196 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 6197 See more details about escaping in the `field documentation 6198 <https://vega.github.io/vega-lite/docs/field.html>`__. 6199 2) ``field`` is not required if ``aggregate`` is ``count``. 6200 timeUnit : :class:`TimeUnit` 6201 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 6202 field. 6203 or `a temporal field that gets casted as ordinal 6204 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 6205 6206 **Default value:** ``undefined`` (None) 6207 6208 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 6209 documentation. 6210 title : anyOf(string, None) 6211 A title for the field. If ``null``, the title will be removed. 6212 6213 **Default value:** derived from the field's name and transformation function ( 6214 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 6215 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 6216 field is binned or has a time unit applied, the applied function is shown in 6217 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 6218 Otherwise, the title is simply the field name. 6219 6220 **Notes** : 6221 6222 1) You can customize the default field title format by providing the `fieldTitle 6223 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 6224 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 6225 function via the compile function's options 6226 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 6227 6228 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 6229 defined, axis/header/legend title will be used. 6230 type : enum('quantitative') 6231 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 6232 ``"ordinal"``, or ``"nominal"`` ). 6233 It can also be a ``"geojson"`` type for encoding `'geoshape' 6234 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 6235 6236 **Note:** 6237 6238 6239 * Data values for a temporal field can be either a date-time string (e.g., 6240 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 6241 timestamp number (e.g., ``1552199579097`` ). 6242 * Data ``type`` describes the semantics of the data rather than the primitive data 6243 types ( ``number``, ``string``, etc.). The same primitive data type can have 6244 different types of measurement. For example, numeric data can represent 6245 quantitative, ordinal, or nominal data. 6246 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 6247 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 6248 or `"ordinal" (for using an ordinal bin scale) 6249 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 6250 * When using with `timeUnit 6251 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 6252 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 6253 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 6254 * When using with `aggregate 6255 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 6256 refers to the post-aggregation data type. For example, we can calculate count 6257 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 6258 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 6259 is ``"quantitative"``. 6260 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 6261 ``type`` as they have exactly the same type as their primary channels (e.g., 6262 ``x``, ``y`` ). 6263 6264 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 6265 documentation. 6266 """ 6267 _schema = {'$ref': '#/definitions/LatLongFieldDef'} 6268 6269 def __init__(self, aggregate=Undefined, bin=Undefined, field=Undefined, timeUnit=Undefined, 6270 title=Undefined, type=Undefined, **kwds): 6271 super(LatLongFieldDef, self).__init__(aggregate=aggregate, bin=bin, field=field, 6272 timeUnit=timeUnit, title=title, type=type, **kwds) 6273 6274 6275class LayoutAlign(VegaLiteSchema): 6276 """LayoutAlign schema wrapper 6277 6278 enum('all', 'each', 'none') 6279 """ 6280 _schema = {'$ref': '#/definitions/LayoutAlign'} 6281 6282 def __init__(self, *args): 6283 super(LayoutAlign, self).__init__(*args) 6284 6285 6286class LayoutBounds(VegaLiteSchema): 6287 """LayoutBounds schema wrapper 6288 6289 anyOf(enum('full'), enum('flush'), :class:`SignalRef`) 6290 """ 6291 _schema = {'$ref': '#/definitions/LayoutBounds'} 6292 6293 def __init__(self, *args, **kwds): 6294 super(LayoutBounds, self).__init__(*args, **kwds) 6295 6296 6297class Legend(VegaLiteSchema): 6298 """Legend schema wrapper 6299 6300 Mapping(required=[]) 6301 Properties of a legend or boolean flag for determining whether to show it. 6302 6303 Attributes 6304 ---------- 6305 6306 clipHeight : float 6307 The height in pixels to clip symbol legend entries and limit their size. 6308 columnPadding : float 6309 The horizontal padding in pixels between symbol legend entries. 6310 6311 **Default value:** ``10``. 6312 columns : float 6313 The number of columns in which to arrange symbol legend entries. A value of ``0`` or 6314 lower indicates a single row with one column per entry. 6315 cornerRadius : float 6316 Corner radius for the full legend. 6317 direction : :class:`Orientation` 6318 The direction of the legend, one of ``"vertical"`` or ``"horizontal"``. 6319 6320 **Default value:** 6321 6322 6323 * For top-/bottom- ``orient`` ed legends, ``"horizontal"`` 6324 * For left-/right- ``orient`` ed legends, ``"vertical"`` 6325 * For top/bottom-left/right- ``orient`` ed legends, ``"horizontal"`` for gradient 6326 legends and ``"vertical"`` for symbol legends. 6327 fillColor : :class:`Color` 6328 Background fill color for the full legend. 6329 format : string 6330 The text formatting pattern for labels of guides (axes, legends, headers) and text 6331 marks. 6332 6333 6334 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 6335 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 6336 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 6337 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 6338 6339 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 6340 for more examples. 6341 6342 **Default value:** Derived from `numberFormat 6343 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 6344 format and from `timeFormat 6345 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 6346 format. 6347 formatType : enum('number', 'time') 6348 The format type for labels ( ``"number"`` or ``"time"`` ). 6349 6350 **Default value:** 6351 6352 6353 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 6354 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 6355 ``timeUnit``. 6356 gradientLength : float 6357 The length in pixels of the primary axis of a color gradient. This value corresponds 6358 to the height of a vertical gradient or the width of a horizontal gradient. 6359 6360 **Default value:** ``200``. 6361 gradientOpacity : float 6362 Opacity of the color gradient. 6363 gradientStrokeColor : :class:`Color` 6364 The color of the gradient stroke, can be in hex color code or regular color name. 6365 6366 **Default value:** ``"lightGray"``. 6367 gradientStrokeWidth : float 6368 The width of the gradient stroke, in pixels. 6369 6370 **Default value:** ``0``. 6371 gradientThickness : float 6372 The thickness in pixels of the color gradient. This value corresponds to the width 6373 of a vertical gradient or the height of a horizontal gradient. 6374 6375 **Default value:** ``16``. 6376 gridAlign : :class:`LayoutAlign` 6377 The alignment to apply to symbol legends rows and columns. The supported string 6378 values are ``"all"``, ``"each"`` (the default), and ``none``. For more information, 6379 see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__. 6380 6381 **Default value:** ``"each"``. 6382 labelAlign : :class:`Align` 6383 The alignment of the legend label, can be left, center, or right. 6384 labelBaseline : :class:`TextBaseline` 6385 The position of the baseline of legend label, can be ``"top"``, ``"middle"``, 6386 ``"bottom"``, or ``"alphabetic"``. 6387 6388 **Default value:** ``"middle"``. 6389 labelColor : :class:`Color` 6390 The color of the legend label, can be in hex color code or regular color name. 6391 labelFont : string 6392 The font of the legend label. 6393 labelFontSize : float 6394 The font size of legend label. 6395 6396 **Default value:** ``10``. 6397 labelFontStyle : :class:`FontStyle` 6398 The font style of legend label. 6399 labelFontWeight : :class:`FontWeight` 6400 The font weight of legend label. 6401 labelLimit : float 6402 Maximum allowed pixel width of legend tick labels. 6403 6404 **Default value:** ``160``. 6405 labelOffset : float 6406 The offset of the legend label. 6407 labelOpacity : float 6408 Opacity of labels. 6409 labelOverlap : :class:`LabelOverlap` 6410 The strategy to use for resolving overlap of labels in gradient legends. If 6411 ``false``, no overlap reduction is attempted. If set to ``true`` (default) or 6412 ``"parity"``, a strategy of removing every other label is used. If set to 6413 ``"greedy"``, a linear scan of the labels is performed, removing any label that 6414 overlaps with the last visible label (this often works better for log-scaled axes). 6415 6416 **Default value:** ``true``. 6417 labelPadding : float 6418 Padding in pixels between the legend and legend labels. 6419 labelSeparation : float 6420 The minimum separation that must be between label bounding boxes for them to be 6421 considered non-overlapping (default ``0`` ). This property is ignored if 6422 *labelOverlap* resolution is not enabled. 6423 legendX : float 6424 Custom x-position for legend with orient "none". 6425 legendY : float 6426 Custom y-position for legend with orient "none". 6427 offset : float 6428 The offset in pixels by which to displace the legend from the data rectangle and 6429 axes. 6430 6431 **Default value:** ``18``. 6432 orient : :class:`LegendOrient` 6433 The orientation of the legend, which determines how the legend is positioned within 6434 the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``, 6435 ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``. 6436 6437 **Default value:** ``"right"`` 6438 padding : float 6439 The padding between the border and content of the legend group. 6440 6441 **Default value:** ``0``. 6442 rowPadding : float 6443 The vertical padding in pixels between symbol legend entries. 6444 6445 **Default value:** ``2``. 6446 strokeColor : :class:`Color` 6447 Border stroke color for the full legend. 6448 symbolDash : List(float) 6449 An array of alternating [stroke, space] lengths for dashed symbol strokes. 6450 symbolDashOffset : float 6451 The pixel offset at which to start drawing with the symbol stroke dash array. 6452 symbolFillColor : :class:`Color` 6453 The color of the legend symbol, 6454 symbolOffset : float 6455 Horizontal pixel offset for legend symbols. 6456 6457 **Default value:** ``0``. 6458 symbolOpacity : float 6459 Opacity of the legend symbols. 6460 symbolSize : float 6461 The size of the legend symbol, in pixels. 6462 6463 **Default value:** ``100``. 6464 symbolStrokeColor : :class:`Color` 6465 Stroke color for legend symbols. 6466 symbolStrokeWidth : float 6467 The width of the symbol's stroke. 6468 6469 **Default value:** ``1.5``. 6470 symbolType : :class:`SymbolShape` 6471 The symbol shape. One of the plotting shapes ``circle`` (default), ``square``, 6472 ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or 6473 ``triangle-left``, the line symbol ``stroke``, or one of the centered directional 6474 shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path 6475 string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be 6476 provided. For correct sizing, custom shape paths should be defined within a square 6477 bounding box with coordinates ranging from -1 to 1 along both the x and y 6478 dimensions. 6479 6480 **Default value:** ``"circle"``. 6481 tickCount : float 6482 The desired number of tick values for quantitative legends. 6483 tickMinStep : float 6484 The minimum desired step between legend ticks, in terms of scale domain values. For 6485 example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. 6486 If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if 6487 necessary, to enforce the minimum step value. 6488 6489 **Default value** : ``undefined`` 6490 title : anyOf(string, None) 6491 A title for the field. If ``null``, the title will be removed. 6492 6493 **Default value:** derived from the field's name and transformation function ( 6494 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 6495 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 6496 field is binned or has a time unit applied, the applied function is shown in 6497 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 6498 Otherwise, the title is simply the field name. 6499 6500 **Notes** : 6501 6502 1) You can customize the default field title format by providing the `fieldTitle 6503 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 6504 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 6505 function via the compile function's options 6506 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 6507 6508 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 6509 defined, axis/header/legend title will be used. 6510 titleAlign : :class:`Align` 6511 Horizontal text alignment for legend titles. 6512 6513 **Default value:** ``"left"``. 6514 titleAnchor : :class:`TitleAnchor` 6515 Text anchor position for placing legend titles. 6516 titleBaseline : :class:`TextBaseline` 6517 Vertical text baseline for legend titles. 6518 6519 **Default value:** ``"top"``. 6520 titleColor : :class:`Color` 6521 The color of the legend title, can be in hex color code or regular color name. 6522 titleFont : string 6523 The font of the legend title. 6524 titleFontSize : float 6525 The font size of the legend title. 6526 titleFontStyle : :class:`FontStyle` 6527 The font style of the legend title. 6528 titleFontWeight : :class:`FontWeight` 6529 The font weight of the legend title. 6530 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 6531 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 6532 ). 6533 titleLimit : float 6534 Maximum allowed pixel width of legend titles. 6535 6536 **Default value:** ``180``. 6537 titleOpacity : float 6538 Opacity of the legend title. 6539 titleOrient : :class:`Orient` 6540 Orientation of the legend title. 6541 titlePadding : float 6542 The padding, in pixels, between title and legend. 6543 6544 **Default value:** ``5``. 6545 type : enum('symbol', 'gradient') 6546 The type of the legend. Use ``"symbol"`` to create a discrete legend and 6547 ``"gradient"`` for a continuous color gradient. 6548 6549 **Default value:** ``"gradient"`` for non-binned quantitative fields and temporal 6550 fields; ``"symbol"`` otherwise. 6551 values : List(anyOf(float, string, boolean, :class:`DateTime`)) 6552 Explicitly set the visible legend values. 6553 zindex : float 6554 A non-negative integer indicating the z-index of the legend. 6555 If zindex is 0, legend should be drawn behind all chart elements. 6556 To put them in front, use zindex = 1. 6557 """ 6558 _schema = {'$ref': '#/definitions/Legend'} 6559 6560 def __init__(self, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined, 6561 cornerRadius=Undefined, direction=Undefined, fillColor=Undefined, format=Undefined, 6562 formatType=Undefined, gradientLength=Undefined, gradientOpacity=Undefined, 6563 gradientStrokeColor=Undefined, gradientStrokeWidth=Undefined, 6564 gradientThickness=Undefined, gridAlign=Undefined, labelAlign=Undefined, 6565 labelBaseline=Undefined, labelColor=Undefined, labelFont=Undefined, 6566 labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, 6567 labelLimit=Undefined, labelOffset=Undefined, labelOpacity=Undefined, 6568 labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, 6569 legendX=Undefined, legendY=Undefined, offset=Undefined, orient=Undefined, 6570 padding=Undefined, rowPadding=Undefined, strokeColor=Undefined, symbolDash=Undefined, 6571 symbolDashOffset=Undefined, symbolFillColor=Undefined, symbolOffset=Undefined, 6572 symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined, 6573 symbolStrokeWidth=Undefined, symbolType=Undefined, tickCount=Undefined, 6574 tickMinStep=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, 6575 titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, 6576 titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, 6577 titleLimit=Undefined, titleOpacity=Undefined, titleOrient=Undefined, 6578 titlePadding=Undefined, type=Undefined, values=Undefined, zindex=Undefined, **kwds): 6579 super(Legend, self).__init__(clipHeight=clipHeight, columnPadding=columnPadding, 6580 columns=columns, cornerRadius=cornerRadius, direction=direction, 6581 fillColor=fillColor, format=format, formatType=formatType, 6582 gradientLength=gradientLength, gradientOpacity=gradientOpacity, 6583 gradientStrokeColor=gradientStrokeColor, 6584 gradientStrokeWidth=gradientStrokeWidth, 6585 gradientThickness=gradientThickness, gridAlign=gridAlign, 6586 labelAlign=labelAlign, labelBaseline=labelBaseline, 6587 labelColor=labelColor, labelFont=labelFont, 6588 labelFontSize=labelFontSize, labelFontStyle=labelFontStyle, 6589 labelFontWeight=labelFontWeight, labelLimit=labelLimit, 6590 labelOffset=labelOffset, labelOpacity=labelOpacity, 6591 labelOverlap=labelOverlap, labelPadding=labelPadding, 6592 labelSeparation=labelSeparation, legendX=legendX, legendY=legendY, 6593 offset=offset, orient=orient, padding=padding, 6594 rowPadding=rowPadding, strokeColor=strokeColor, 6595 symbolDash=symbolDash, symbolDashOffset=symbolDashOffset, 6596 symbolFillColor=symbolFillColor, symbolOffset=symbolOffset, 6597 symbolOpacity=symbolOpacity, symbolSize=symbolSize, 6598 symbolStrokeColor=symbolStrokeColor, 6599 symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType, 6600 tickCount=tickCount, tickMinStep=tickMinStep, title=title, 6601 titleAlign=titleAlign, titleAnchor=titleAnchor, 6602 titleBaseline=titleBaseline, titleColor=titleColor, 6603 titleFont=titleFont, titleFontSize=titleFontSize, 6604 titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight, 6605 titleLimit=titleLimit, titleOpacity=titleOpacity, 6606 titleOrient=titleOrient, titlePadding=titlePadding, type=type, 6607 values=values, zindex=zindex, **kwds) 6608 6609 6610class LegendConfig(VegaLiteSchema): 6611 """LegendConfig schema wrapper 6612 6613 Mapping(required=[]) 6614 6615 Attributes 6616 ---------- 6617 6618 clipHeight : float 6619 The height in pixels to clip symbol legend entries and limit their size. 6620 columnPadding : float 6621 The horizontal padding in pixels between symbol legend entries. 6622 6623 **Default value:** ``10``. 6624 columns : float 6625 The number of columns in which to arrange symbol legend entries. A value of ``0`` or 6626 lower indicates a single row with one column per entry. 6627 cornerRadius : float 6628 Corner radius for the full legend. 6629 fillColor : :class:`Color` 6630 Background fill color for the full legend. 6631 gradientDirection : :class:`Orientation` 6632 The default direction ( ``"horizontal"`` or ``"vertical"`` ) for gradient legends. 6633 6634 **Default value:** ``"vertical"``. 6635 gradientHorizontalMaxLength : float 6636 Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is 6637 undefined. 6638 6639 **Default value:** ``200`` 6640 gradientHorizontalMinLength : float 6641 Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is 6642 undefined. 6643 6644 **Default value:** ``100`` 6645 gradientLabelLimit : float 6646 The maximum allowed length in pixels of color ramp gradient labels. 6647 gradientLabelOffset : float 6648 Vertical offset in pixels for color ramp gradient labels. 6649 6650 **Default value:** ``2``. 6651 gradientLength : float 6652 The length in pixels of the primary axis of a color gradient. This value corresponds 6653 to the height of a vertical gradient or the width of a horizontal gradient. 6654 6655 **Default value:** ``200``. 6656 gradientOpacity : float 6657 Opacity of the color gradient. 6658 gradientStrokeColor : :class:`Color` 6659 The color of the gradient stroke, can be in hex color code or regular color name. 6660 6661 **Default value:** ``"lightGray"``. 6662 gradientStrokeWidth : float 6663 The width of the gradient stroke, in pixels. 6664 6665 **Default value:** ``0``. 6666 gradientThickness : float 6667 The thickness in pixels of the color gradient. This value corresponds to the width 6668 of a vertical gradient or the height of a horizontal gradient. 6669 6670 **Default value:** ``16``. 6671 gradientVerticalMaxLength : float 6672 Max legend length for a vertical gradient when ``config.legend.gradientLength`` is 6673 undefined. 6674 6675 **Default value:** ``200`` 6676 gradientVerticalMinLength : float 6677 Min legend length for a vertical gradient when ``config.legend.gradientLength`` is 6678 undefined. 6679 6680 **Default value:** ``100`` 6681 gridAlign : :class:`LayoutAlign` 6682 The alignment to apply to symbol legends rows and columns. The supported string 6683 values are ``"all"``, ``"each"`` (the default), and ``none``. For more information, 6684 see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__. 6685 6686 **Default value:** ``"each"``. 6687 labelAlign : :class:`Align` 6688 The alignment of the legend label, can be left, center, or right. 6689 labelBaseline : :class:`TextBaseline` 6690 The position of the baseline of legend label, can be ``"top"``, ``"middle"``, 6691 ``"bottom"``, or ``"alphabetic"``. 6692 6693 **Default value:** ``"middle"``. 6694 labelColor : :class:`Color` 6695 The color of the legend label, can be in hex color code or regular color name. 6696 labelFont : string 6697 The font of the legend label. 6698 labelFontSize : float 6699 The font size of legend label. 6700 6701 **Default value:** ``10``. 6702 labelFontStyle : :class:`FontStyle` 6703 The font style of legend label. 6704 labelFontWeight : :class:`FontWeight` 6705 The font weight of legend label. 6706 labelLimit : float 6707 Maximum allowed pixel width of legend tick labels. 6708 6709 **Default value:** ``160``. 6710 labelOffset : float 6711 The offset of the legend label. 6712 labelOpacity : float 6713 Opacity of labels. 6714 labelOverlap : :class:`LabelOverlap` 6715 The strategy to use for resolving overlap of labels in gradient legends. If 6716 ``false``, no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a 6717 strategy of removing every other label is used. If set to ``"greedy"``, a linear 6718 scan of the labels is performed, removing any label that overlaps with the last 6719 visible label (this often works better for log-scaled axes). 6720 6721 **Default value:** ``"greedy"`` for ``log scales otherwise`` true`. 6722 labelPadding : float 6723 Padding in pixels between the legend and legend labels. 6724 labelSeparation : float 6725 The minimum separation that must be between label bounding boxes for them to be 6726 considered non-overlapping (default ``0`` ). This property is ignored if 6727 *labelOverlap* resolution is not enabled. 6728 layout : :class:`LegendLayout` 6729 Legend orient group layout parameters. 6730 legendX : float 6731 Custom x-position for legend with orient "none". 6732 legendY : float 6733 Custom y-position for legend with orient "none". 6734 offset : float 6735 The offset in pixels by which to displace the legend from the data rectangle and 6736 axes. 6737 6738 **Default value:** ``18``. 6739 orient : :class:`LegendOrient` 6740 The orientation of the legend, which determines how the legend is positioned within 6741 the scene. One of "left", "right", "top-left", "top-right", "bottom-left", 6742 "bottom-right", "none". 6743 6744 **Default value:** ``"right"`` 6745 padding : float 6746 The padding between the border and content of the legend group. 6747 6748 **Default value:** ``0``. 6749 rowPadding : float 6750 The vertical padding in pixels between symbol legend entries. 6751 6752 **Default value:** ``2``. 6753 shortTimeLabels : boolean 6754 Whether month names and weekday names should be abbreviated. 6755 6756 **Default value:** ``false`` 6757 strokeColor : :class:`Color` 6758 Border stroke color for the full legend. 6759 strokeDash : List(float) 6760 Border stroke dash pattern for the full legend. 6761 strokeWidth : float 6762 Border stroke width for the full legend. 6763 symbolBaseFillColor : :class:`Color` 6764 Default fill color for legend symbols. Only applied if there is no ``"fill"`` scale 6765 color encoding for the legend. 6766 6767 **Default value:** ``"transparent"``. 6768 symbolBaseStrokeColor : :class:`Color` 6769 Default stroke color for legend symbols. Only applied if there is no ``"fill"`` 6770 scale color encoding for the legend. 6771 6772 **Default value:** ``"gray"``. 6773 symbolDash : List(float) 6774 An array of alternating [stroke, space] lengths for dashed symbol strokes. 6775 symbolDashOffset : float 6776 The pixel offset at which to start drawing with the symbol stroke dash array. 6777 symbolDirection : :class:`Orientation` 6778 The default direction ( ``"horizontal"`` or ``"vertical"`` ) for symbol legends. 6779 6780 **Default value:** ``"vertical"``. 6781 symbolFillColor : :class:`Color` 6782 The color of the legend symbol, 6783 symbolOffset : float 6784 Horizontal pixel offset for legend symbols. 6785 6786 **Default value:** ``0``. 6787 symbolOpacity : float 6788 Opacity of the legend symbols. 6789 symbolSize : float 6790 The size of the legend symbol, in pixels. 6791 6792 **Default value:** ``100``. 6793 symbolStrokeColor : :class:`Color` 6794 Stroke color for legend symbols. 6795 symbolStrokeWidth : float 6796 The width of the symbol's stroke. 6797 6798 **Default value:** ``1.5``. 6799 symbolType : :class:`SymbolShape` 6800 The symbol shape. One of the plotting shapes ``circle`` (default), ``square``, 6801 ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or 6802 ``triangle-left``, the line symbol ``stroke``, or one of the centered directional 6803 shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path 6804 string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be 6805 provided. For correct sizing, custom shape paths should be defined within a square 6806 bounding box with coordinates ranging from -1 to 1 along both the x and y 6807 dimensions. 6808 6809 **Default value:** ``"circle"``. 6810 title : None 6811 Set to null to disable title for the axis, legend, or header. 6812 titleAlign : :class:`Align` 6813 Horizontal text alignment for legend titles. 6814 6815 **Default value:** ``"left"``. 6816 titleAnchor : :class:`TitleAnchor` 6817 Text anchor position for placing legend titles. 6818 titleBaseline : :class:`TextBaseline` 6819 Vertical text baseline for legend titles. 6820 6821 **Default value:** ``"top"``. 6822 titleColor : :class:`Color` 6823 The color of the legend title, can be in hex color code or regular color name. 6824 titleFont : string 6825 The font of the legend title. 6826 titleFontSize : float 6827 The font size of the legend title. 6828 titleFontStyle : :class:`FontStyle` 6829 The font style of the legend title. 6830 titleFontWeight : :class:`FontWeight` 6831 The font weight of the legend title. 6832 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 6833 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 6834 ). 6835 titleLimit : float 6836 Maximum allowed pixel width of legend titles. 6837 6838 **Default value:** ``180``. 6839 titleOpacity : float 6840 Opacity of the legend title. 6841 titleOrient : :class:`Orient` 6842 Orientation of the legend title. 6843 titlePadding : float 6844 The padding, in pixels, between title and legend. 6845 6846 **Default value:** ``5``. 6847 """ 6848 _schema = {'$ref': '#/definitions/LegendConfig'} 6849 6850 def __init__(self, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined, 6851 cornerRadius=Undefined, fillColor=Undefined, gradientDirection=Undefined, 6852 gradientHorizontalMaxLength=Undefined, gradientHorizontalMinLength=Undefined, 6853 gradientLabelLimit=Undefined, gradientLabelOffset=Undefined, gradientLength=Undefined, 6854 gradientOpacity=Undefined, gradientStrokeColor=Undefined, 6855 gradientStrokeWidth=Undefined, gradientThickness=Undefined, 6856 gradientVerticalMaxLength=Undefined, gradientVerticalMinLength=Undefined, 6857 gridAlign=Undefined, labelAlign=Undefined, labelBaseline=Undefined, 6858 labelColor=Undefined, labelFont=Undefined, labelFontSize=Undefined, 6859 labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, 6860 labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, 6861 labelPadding=Undefined, labelSeparation=Undefined, layout=Undefined, legendX=Undefined, 6862 legendY=Undefined, offset=Undefined, orient=Undefined, padding=Undefined, 6863 rowPadding=Undefined, shortTimeLabels=Undefined, strokeColor=Undefined, 6864 strokeDash=Undefined, strokeWidth=Undefined, symbolBaseFillColor=Undefined, 6865 symbolBaseStrokeColor=Undefined, symbolDash=Undefined, symbolDashOffset=Undefined, 6866 symbolDirection=Undefined, symbolFillColor=Undefined, symbolOffset=Undefined, 6867 symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined, 6868 symbolStrokeWidth=Undefined, symbolType=Undefined, title=Undefined, 6869 titleAlign=Undefined, titleAnchor=Undefined, titleBaseline=Undefined, 6870 titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, 6871 titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, 6872 titleOpacity=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds): 6873 super(LegendConfig, self).__init__(clipHeight=clipHeight, columnPadding=columnPadding, 6874 columns=columns, cornerRadius=cornerRadius, 6875 fillColor=fillColor, gradientDirection=gradientDirection, 6876 gradientHorizontalMaxLength=gradientHorizontalMaxLength, 6877 gradientHorizontalMinLength=gradientHorizontalMinLength, 6878 gradientLabelLimit=gradientLabelLimit, 6879 gradientLabelOffset=gradientLabelOffset, 6880 gradientLength=gradientLength, 6881 gradientOpacity=gradientOpacity, 6882 gradientStrokeColor=gradientStrokeColor, 6883 gradientStrokeWidth=gradientStrokeWidth, 6884 gradientThickness=gradientThickness, 6885 gradientVerticalMaxLength=gradientVerticalMaxLength, 6886 gradientVerticalMinLength=gradientVerticalMinLength, 6887 gridAlign=gridAlign, labelAlign=labelAlign, 6888 labelBaseline=labelBaseline, labelColor=labelColor, 6889 labelFont=labelFont, labelFontSize=labelFontSize, 6890 labelFontStyle=labelFontStyle, 6891 labelFontWeight=labelFontWeight, labelLimit=labelLimit, 6892 labelOffset=labelOffset, labelOpacity=labelOpacity, 6893 labelOverlap=labelOverlap, labelPadding=labelPadding, 6894 labelSeparation=labelSeparation, layout=layout, 6895 legendX=legendX, legendY=legendY, offset=offset, 6896 orient=orient, padding=padding, rowPadding=rowPadding, 6897 shortTimeLabels=shortTimeLabels, strokeColor=strokeColor, 6898 strokeDash=strokeDash, strokeWidth=strokeWidth, 6899 symbolBaseFillColor=symbolBaseFillColor, 6900 symbolBaseStrokeColor=symbolBaseStrokeColor, 6901 symbolDash=symbolDash, symbolDashOffset=symbolDashOffset, 6902 symbolDirection=symbolDirection, 6903 symbolFillColor=symbolFillColor, symbolOffset=symbolOffset, 6904 symbolOpacity=symbolOpacity, symbolSize=symbolSize, 6905 symbolStrokeColor=symbolStrokeColor, 6906 symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType, 6907 title=title, titleAlign=titleAlign, titleAnchor=titleAnchor, 6908 titleBaseline=titleBaseline, titleColor=titleColor, 6909 titleFont=titleFont, titleFontSize=titleFontSize, 6910 titleFontStyle=titleFontStyle, 6911 titleFontWeight=titleFontWeight, titleLimit=titleLimit, 6912 titleOpacity=titleOpacity, titleOrient=titleOrient, 6913 titlePadding=titlePadding, **kwds) 6914 6915 6916class LegendLayout(VegaLiteSchema): 6917 """LegendLayout schema wrapper 6918 6919 Mapping(required=[]) 6920 6921 Attributes 6922 ---------- 6923 6924 anchor : :class:`TitleAnchor` 6925 The anchor point for legend orient group layout. 6926 bottom : :class:`BaseLegendLayout` 6927 6928 bounds : :class:`LayoutBounds` 6929 The bounds calculation to use for legend orient group layout. 6930 center : anyOf(boolean, :class:`SignalRef`) 6931 A flag to center legends within a shared orient group. 6932 direction : anyOf(:class:`Orientation`, :class:`SignalRef`) 6933 The layout direction for legend orient group layout. 6934 left : :class:`BaseLegendLayout` 6935 6936 margin : anyOf(float, :class:`SignalRef`) 6937 The pixel margin between legends within a orient group. 6938 offset : anyOf(float, :class:`SignalRef`) 6939 The pixel offset from the chart body for a legend orient group. 6940 right : :class:`BaseLegendLayout` 6941 6942 top : :class:`BaseLegendLayout` 6943 6944 bottom-left : :class:`BaseLegendLayout` 6945 6946 bottom-right : :class:`BaseLegendLayout` 6947 6948 top-left : :class:`BaseLegendLayout` 6949 6950 top-right : :class:`BaseLegendLayout` 6951 6952 """ 6953 _schema = {'$ref': '#/definitions/LegendLayout'} 6954 6955 def __init__(self, anchor=Undefined, bottom=Undefined, bounds=Undefined, center=Undefined, 6956 direction=Undefined, left=Undefined, margin=Undefined, offset=Undefined, 6957 right=Undefined, top=Undefined, **kwds): 6958 super(LegendLayout, self).__init__(anchor=anchor, bottom=bottom, bounds=bounds, center=center, 6959 direction=direction, left=left, margin=margin, offset=offset, 6960 right=right, top=top, **kwds) 6961 6962 6963class LegendOrient(VegaLiteSchema): 6964 """LegendOrient schema wrapper 6965 6966 enum('none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 6967 'bottom-right') 6968 """ 6969 _schema = {'$ref': '#/definitions/LegendOrient'} 6970 6971 def __init__(self, *args): 6972 super(LegendOrient, self).__init__(*args) 6973 6974 6975class LegendResolveMap(VegaLiteSchema): 6976 """LegendResolveMap schema wrapper 6977 6978 Mapping(required=[]) 6979 6980 Attributes 6981 ---------- 6982 6983 color : :class:`ResolveMode` 6984 6985 fill : :class:`ResolveMode` 6986 6987 fillOpacity : :class:`ResolveMode` 6988 6989 opacity : :class:`ResolveMode` 6990 6991 shape : :class:`ResolveMode` 6992 6993 size : :class:`ResolveMode` 6994 6995 stroke : :class:`ResolveMode` 6996 6997 strokeOpacity : :class:`ResolveMode` 6998 6999 strokeWidth : :class:`ResolveMode` 7000 7001 """ 7002 _schema = {'$ref': '#/definitions/LegendResolveMap'} 7003 7004 def __init__(self, color=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, 7005 shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined, 7006 strokeWidth=Undefined, **kwds): 7007 super(LegendResolveMap, self).__init__(color=color, fill=fill, fillOpacity=fillOpacity, 7008 opacity=opacity, shape=shape, size=size, stroke=stroke, 7009 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 7010 **kwds) 7011 7012 7013class LineConfig(VegaLiteSchema): 7014 """LineConfig schema wrapper 7015 7016 Mapping(required=[]) 7017 7018 Attributes 7019 ---------- 7020 7021 align : :class:`Align` 7022 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 7023 angle : float 7024 The rotation angle of the text, in degrees. 7025 baseline : :class:`TextBaseline` 7026 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 7027 7028 **Default value:** ``"middle"`` 7029 color : :class:`Color` 7030 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 7031 ``color`` and will override ``color``. 7032 7033 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 7034 ``"#4682b4"`` 7035 7036 **Note:** This property cannot be used in a `style config 7037 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 7038 cornerRadius : float 7039 The radius in pixels of rounded rectangle corners. 7040 7041 **Default value:** ``0`` 7042 cursor : :class:`Cursor` 7043 The mouse cursor used over the mark. Any valid `CSS cursor type 7044 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 7045 dir : :class:`Dir` 7046 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 7047 (right-to-left). This property determines on which side is truncated in response to 7048 the limit parameter. 7049 7050 **Default value:** ``"ltr"`` 7051 dx : float 7052 The horizontal offset, in pixels, between the text label and its anchor point. The 7053 offset is applied after rotation by the *angle* property. 7054 dy : float 7055 The vertical offset, in pixels, between the text label and its anchor point. The 7056 offset is applied after rotation by the *angle* property. 7057 ellipsis : string 7058 The ellipsis string for text truncated in response to the limit parameter. 7059 7060 **Default value:** ``"…"`` 7061 fill : :class:`Color` 7062 Default Fill Color. This has higher precedence than ``config.color`` 7063 7064 **Default value:** (None) 7065 fillOpacity : float 7066 The fill opacity (value between [0,1]). 7067 7068 **Default value:** ``1`` 7069 filled : boolean 7070 Whether the mark's color should be used as fill color instead of stroke color. 7071 7072 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 7073 ``true``. 7074 7075 **Note:** This property cannot be used in a `style config 7076 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 7077 font : string 7078 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 7079 fontSize : float 7080 The font size, in pixels. 7081 fontStyle : :class:`FontStyle` 7082 The font style (e.g., ``"italic"`` ). 7083 fontWeight : :class:`FontWeight` 7084 The font weight. 7085 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 7086 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 7087 ). 7088 height : float 7089 Height of the marks. 7090 href : string 7091 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 7092 interpolate : :class:`Interpolate` 7093 The line interpolation method to use for line and area marks. One of the following: 7094 7095 7096 * ``"linear"`` : piecewise linear segments, as in a polyline. 7097 * ``"linear-closed"`` : close the linear segments to form a polygon. 7098 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 7099 function. 7100 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 7101 step function. 7102 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 7103 step function. 7104 * ``"basis"`` : a B-spline, with control point duplication on the ends. 7105 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 7106 * ``"basis-closed"`` : a closed B-spline, as in a loop. 7107 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 7108 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 7109 but will intersect other control points. 7110 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 7111 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 7112 straighten the spline. 7113 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 7114 limit : float 7115 The maximum length of the text mark in pixels. The text value will be automatically 7116 truncated if the rendered size exceeds the limit. 7117 7118 **Default value:** ``0``, indicating no limit 7119 opacity : float 7120 The overall opacity (value between [0,1]). 7121 7122 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 7123 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 7124 order : anyOf(None, boolean) 7125 For line and trail marks, this ``order`` property can be set to ``null`` or 7126 ``false`` to make the lines use the original order in the data sources. 7127 orient : :class:`Orientation` 7128 The orientation of a non-stacked bar, tick, area, and line charts. 7129 The value is either horizontal (default) or vertical. 7130 7131 7132 * For bar, rule and tick, this determines whether the size of the bar and tick 7133 should be applied to x or y dimension. 7134 * For area, this property determines the orient property of the Vega output. 7135 * For line and trail marks, this property determines the sort order of the points in 7136 the line 7137 if ``config.sortLineBy`` is not specified. 7138 For stacked charts, this is always determined by the orientation of the stack; 7139 therefore explicitly specified value will be ignored. 7140 point : anyOf(boolean, :class:`OverlayMarkDef`, enum('transparent')) 7141 A flag for overlaying points on top of line or area marks, or an object defining the 7142 properties of the overlayed points. 7143 7144 7145 If this property is ``"transparent"``, transparent points will be used (for 7146 enhancing tooltips and selections). 7147 7148 If this property is an empty object ( ``{}`` ) or ``true``, filled points with 7149 default properties will be used. 7150 7151 If this property is ``false``, no points would be automatically added to line or 7152 area marks. 7153 7154 **Default value:** ``false``. 7155 radius : float 7156 Polar coordinate radial offset, in pixels, of the text label from the origin 7157 determined by the ``x`` and ``y`` properties. 7158 shape : string 7159 Shape of the point marks. Supported values include: 7160 7161 7162 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 7163 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 7164 ``"triangle-left"``. 7165 * the line symbol ``"stroke"`` 7166 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 7167 * a custom `SVG path string 7168 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 7169 sizing, custom shape paths should be defined within a square bounding box with 7170 coordinates ranging from -1 to 1 along both the x and y dimensions.) 7171 7172 **Default value:** ``"circle"`` 7173 size : float 7174 Default size for marks. 7175 7176 7177 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 7178 marks. For example: in the case of circles, the radius is determined in part by 7179 the square root of the size value. 7180 * For ``bar``, this represents the band size of the bar, in pixels. 7181 * For ``text``, this represents the font size, in pixels. 7182 7183 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 7184 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 7185 ``11`` for text marks. 7186 stroke : :class:`Color` 7187 Default Stroke Color. This has higher precedence than ``config.color`` 7188 7189 **Default value:** (None) 7190 strokeCap : :class:`StrokeCap` 7191 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 7192 ``"square"``. 7193 7194 **Default value:** ``"square"`` 7195 strokeDash : List(float) 7196 An array of alternating stroke, space lengths for creating dashed or dotted lines. 7197 strokeDashOffset : float 7198 The offset (in pixels) into which to begin drawing with the stroke dash array. 7199 strokeJoin : :class:`StrokeJoin` 7200 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 7201 7202 **Default value:** ``"miter"`` 7203 strokeMiterLimit : float 7204 The miter limit at which to bevel a line join. 7205 strokeOpacity : float 7206 The stroke opacity (value between [0,1]). 7207 7208 **Default value:** ``1`` 7209 strokeWidth : float 7210 The stroke width, in pixels. 7211 tension : float 7212 Depending on the interpolation type, sets the tension parameter (for line and area 7213 marks). 7214 text : string 7215 Placeholder text if the ``text`` channel is not specified 7216 theta : float 7217 Polar coordinate angle, in radians, of the text label from the origin determined by 7218 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 7219 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 7220 radians, with ``0`` indicating "north". 7221 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 7222 The tooltip text string to show upon mouse hover or an object defining which fields 7223 should the tooltip be derived from. 7224 7225 7226 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 7227 will be used. 7228 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 7229 highlighted data point will be used. 7230 * If set to ``null``, then no tooltip will be used. 7231 width : float 7232 Width of the marks. 7233 x : anyOf(float, enum('width')) 7234 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 7235 specified ``x2`` or ``width``. 7236 7237 The ``value`` of this channel can be a number or a string ``"width"`` for the width 7238 of the plot. 7239 x2 : anyOf(float, enum('width')) 7240 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 7241 7242 The ``value`` of this channel can be a number or a string ``"width"`` for the width 7243 of the plot. 7244 y : anyOf(float, enum('height')) 7245 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 7246 specified ``y2`` or ``height``. 7247 7248 The ``value`` of this channel can be a number or a string ``"height"`` for the 7249 height of the plot. 7250 y2 : anyOf(float, enum('width')) 7251 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 7252 7253 The ``value`` of this channel can be a number or a string ``"height"`` for the 7254 height of the plot. 7255 """ 7256 _schema = {'$ref': '#/definitions/LineConfig'} 7257 7258 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, 7259 cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, 7260 ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, 7261 font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, 7262 height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined, 7263 opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined, 7264 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 7265 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 7266 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 7267 strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, 7268 tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, 7269 y2=Undefined, **kwds): 7270 super(LineConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color, 7271 cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, 7272 dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, 7273 filled=filled, font=font, fontSize=fontSize, 7274 fontStyle=fontStyle, fontWeight=fontWeight, height=height, 7275 href=href, interpolate=interpolate, limit=limit, 7276 opacity=opacity, order=order, orient=orient, point=point, 7277 radius=radius, shape=shape, size=size, stroke=stroke, 7278 strokeCap=strokeCap, strokeDash=strokeDash, 7279 strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin, 7280 strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity, 7281 strokeWidth=strokeWidth, tension=tension, text=text, 7282 theta=theta, tooltip=tooltip, width=width, x=x, x2=x2, y=y, 7283 y2=y2, **kwds) 7284 7285 7286class LogicalOperandPredicate(VegaLiteSchema): 7287 """LogicalOperandPredicate schema wrapper 7288 7289 anyOf(:class:`LogicalNotPredicate`, :class:`LogicalAndPredicate`, 7290 :class:`LogicalOrPredicate`, :class:`Predicate`) 7291 """ 7292 _schema = {'$ref': '#/definitions/LogicalOperand<Predicate>'} 7293 7294 def __init__(self, *args, **kwds): 7295 super(LogicalOperandPredicate, self).__init__(*args, **kwds) 7296 7297 7298class LogicalAndPredicate(LogicalOperandPredicate): 7299 """LogicalAndPredicate schema wrapper 7300 7301 Mapping(required=[and]) 7302 7303 Attributes 7304 ---------- 7305 7306 and : List(:class:`LogicalOperandPredicate`) 7307 7308 """ 7309 _schema = {'$ref': '#/definitions/LogicalAnd<Predicate>'} 7310 7311 def __init__(self, **kwds): 7312 super(LogicalAndPredicate, self).__init__(**kwds) 7313 7314 7315class LogicalNotPredicate(LogicalOperandPredicate): 7316 """LogicalNotPredicate schema wrapper 7317 7318 Mapping(required=[not]) 7319 7320 Attributes 7321 ---------- 7322 7323 not : :class:`LogicalOperandPredicate` 7324 7325 """ 7326 _schema = {'$ref': '#/definitions/LogicalNot<Predicate>'} 7327 7328 def __init__(self, **kwds): 7329 super(LogicalNotPredicate, self).__init__(**kwds) 7330 7331 7332class LogicalOrPredicate(LogicalOperandPredicate): 7333 """LogicalOrPredicate schema wrapper 7334 7335 Mapping(required=[or]) 7336 7337 Attributes 7338 ---------- 7339 7340 or : List(:class:`LogicalOperandPredicate`) 7341 7342 """ 7343 _schema = {'$ref': '#/definitions/LogicalOr<Predicate>'} 7344 7345 def __init__(self, **kwds): 7346 super(LogicalOrPredicate, self).__init__(**kwds) 7347 7348 7349class LookupData(VegaLiteSchema): 7350 """LookupData schema wrapper 7351 7352 Mapping(required=[data, key]) 7353 7354 Attributes 7355 ---------- 7356 7357 data : :class:`Data` 7358 Secondary data source to lookup in. 7359 key : :class:`FieldName` 7360 Key in data to lookup. 7361 fields : List(:class:`FieldName`) 7362 Fields in foreign data to lookup. 7363 If not specified, the entire object is queried. 7364 """ 7365 _schema = {'$ref': '#/definitions/LookupData'} 7366 7367 def __init__(self, data=Undefined, key=Undefined, fields=Undefined, **kwds): 7368 super(LookupData, self).__init__(data=data, key=key, fields=fields, **kwds) 7369 7370 7371class Mark(AnyMark): 7372 """Mark schema wrapper 7373 7374 enum('area', 'bar', 'line', 'trail', 'point', 'text', 'tick', 'rect', 'rule', 'circle', 7375 'square', 'geoshape') 7376 All types of primitive marks. 7377 """ 7378 _schema = {'$ref': '#/definitions/Mark'} 7379 7380 def __init__(self, *args): 7381 super(Mark, self).__init__(*args) 7382 7383 7384class MarkConfig(VegaLiteSchema): 7385 """MarkConfig schema wrapper 7386 7387 Mapping(required=[]) 7388 7389 Attributes 7390 ---------- 7391 7392 align : :class:`Align` 7393 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 7394 angle : float 7395 The rotation angle of the text, in degrees. 7396 baseline : :class:`TextBaseline` 7397 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 7398 7399 **Default value:** ``"middle"`` 7400 color : :class:`Color` 7401 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 7402 ``color`` and will override ``color``. 7403 7404 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 7405 ``"#4682b4"`` 7406 7407 **Note:** This property cannot be used in a `style config 7408 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 7409 cornerRadius : float 7410 The radius in pixels of rounded rectangle corners. 7411 7412 **Default value:** ``0`` 7413 cursor : :class:`Cursor` 7414 The mouse cursor used over the mark. Any valid `CSS cursor type 7415 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 7416 dir : :class:`Dir` 7417 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 7418 (right-to-left). This property determines on which side is truncated in response to 7419 the limit parameter. 7420 7421 **Default value:** ``"ltr"`` 7422 dx : float 7423 The horizontal offset, in pixels, between the text label and its anchor point. The 7424 offset is applied after rotation by the *angle* property. 7425 dy : float 7426 The vertical offset, in pixels, between the text label and its anchor point. The 7427 offset is applied after rotation by the *angle* property. 7428 ellipsis : string 7429 The ellipsis string for text truncated in response to the limit parameter. 7430 7431 **Default value:** ``"…"`` 7432 fill : :class:`Color` 7433 Default Fill Color. This has higher precedence than ``config.color`` 7434 7435 **Default value:** (None) 7436 fillOpacity : float 7437 The fill opacity (value between [0,1]). 7438 7439 **Default value:** ``1`` 7440 filled : boolean 7441 Whether the mark's color should be used as fill color instead of stroke color. 7442 7443 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 7444 ``true``. 7445 7446 **Note:** This property cannot be used in a `style config 7447 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 7448 font : string 7449 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 7450 fontSize : float 7451 The font size, in pixels. 7452 fontStyle : :class:`FontStyle` 7453 The font style (e.g., ``"italic"`` ). 7454 fontWeight : :class:`FontWeight` 7455 The font weight. 7456 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 7457 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 7458 ). 7459 height : float 7460 Height of the marks. 7461 href : string 7462 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 7463 interpolate : :class:`Interpolate` 7464 The line interpolation method to use for line and area marks. One of the following: 7465 7466 7467 * ``"linear"`` : piecewise linear segments, as in a polyline. 7468 * ``"linear-closed"`` : close the linear segments to form a polygon. 7469 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 7470 function. 7471 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 7472 step function. 7473 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 7474 step function. 7475 * ``"basis"`` : a B-spline, with control point duplication on the ends. 7476 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 7477 * ``"basis-closed"`` : a closed B-spline, as in a loop. 7478 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 7479 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 7480 but will intersect other control points. 7481 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 7482 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 7483 straighten the spline. 7484 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 7485 limit : float 7486 The maximum length of the text mark in pixels. The text value will be automatically 7487 truncated if the rendered size exceeds the limit. 7488 7489 **Default value:** ``0``, indicating no limit 7490 opacity : float 7491 The overall opacity (value between [0,1]). 7492 7493 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 7494 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 7495 order : anyOf(None, boolean) 7496 For line and trail marks, this ``order`` property can be set to ``null`` or 7497 ``false`` to make the lines use the original order in the data sources. 7498 orient : :class:`Orientation` 7499 The orientation of a non-stacked bar, tick, area, and line charts. 7500 The value is either horizontal (default) or vertical. 7501 7502 7503 * For bar, rule and tick, this determines whether the size of the bar and tick 7504 should be applied to x or y dimension. 7505 * For area, this property determines the orient property of the Vega output. 7506 * For line and trail marks, this property determines the sort order of the points in 7507 the line 7508 if ``config.sortLineBy`` is not specified. 7509 For stacked charts, this is always determined by the orientation of the stack; 7510 therefore explicitly specified value will be ignored. 7511 radius : float 7512 Polar coordinate radial offset, in pixels, of the text label from the origin 7513 determined by the ``x`` and ``y`` properties. 7514 shape : string 7515 Shape of the point marks. Supported values include: 7516 7517 7518 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 7519 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 7520 ``"triangle-left"``. 7521 * the line symbol ``"stroke"`` 7522 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 7523 * a custom `SVG path string 7524 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 7525 sizing, custom shape paths should be defined within a square bounding box with 7526 coordinates ranging from -1 to 1 along both the x and y dimensions.) 7527 7528 **Default value:** ``"circle"`` 7529 size : float 7530 Default size for marks. 7531 7532 7533 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 7534 marks. For example: in the case of circles, the radius is determined in part by 7535 the square root of the size value. 7536 * For ``bar``, this represents the band size of the bar, in pixels. 7537 * For ``text``, this represents the font size, in pixels. 7538 7539 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 7540 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 7541 ``11`` for text marks. 7542 stroke : :class:`Color` 7543 Default Stroke Color. This has higher precedence than ``config.color`` 7544 7545 **Default value:** (None) 7546 strokeCap : :class:`StrokeCap` 7547 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 7548 ``"square"``. 7549 7550 **Default value:** ``"square"`` 7551 strokeDash : List(float) 7552 An array of alternating stroke, space lengths for creating dashed or dotted lines. 7553 strokeDashOffset : float 7554 The offset (in pixels) into which to begin drawing with the stroke dash array. 7555 strokeJoin : :class:`StrokeJoin` 7556 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 7557 7558 **Default value:** ``"miter"`` 7559 strokeMiterLimit : float 7560 The miter limit at which to bevel a line join. 7561 strokeOpacity : float 7562 The stroke opacity (value between [0,1]). 7563 7564 **Default value:** ``1`` 7565 strokeWidth : float 7566 The stroke width, in pixels. 7567 tension : float 7568 Depending on the interpolation type, sets the tension parameter (for line and area 7569 marks). 7570 text : string 7571 Placeholder text if the ``text`` channel is not specified 7572 theta : float 7573 Polar coordinate angle, in radians, of the text label from the origin determined by 7574 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 7575 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 7576 radians, with ``0`` indicating "north". 7577 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 7578 The tooltip text string to show upon mouse hover or an object defining which fields 7579 should the tooltip be derived from. 7580 7581 7582 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 7583 will be used. 7584 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 7585 highlighted data point will be used. 7586 * If set to ``null``, then no tooltip will be used. 7587 width : float 7588 Width of the marks. 7589 x : anyOf(float, enum('width')) 7590 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 7591 specified ``x2`` or ``width``. 7592 7593 The ``value`` of this channel can be a number or a string ``"width"`` for the width 7594 of the plot. 7595 x2 : anyOf(float, enum('width')) 7596 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 7597 7598 The ``value`` of this channel can be a number or a string ``"width"`` for the width 7599 of the plot. 7600 y : anyOf(float, enum('height')) 7601 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 7602 specified ``y2`` or ``height``. 7603 7604 The ``value`` of this channel can be a number or a string ``"height"`` for the 7605 height of the plot. 7606 y2 : anyOf(float, enum('width')) 7607 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 7608 7609 The ``value`` of this channel can be a number or a string ``"height"`` for the 7610 height of the plot. 7611 """ 7612 _schema = {'$ref': '#/definitions/MarkConfig'} 7613 7614 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, 7615 cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, 7616 ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, 7617 font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, 7618 height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined, 7619 opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, 7620 shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, 7621 strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, 7622 strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, 7623 tension=Undefined, text=Undefined, theta=Undefined, tooltip=Undefined, width=Undefined, 7624 x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds): 7625 super(MarkConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color, 7626 cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, 7627 dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, 7628 filled=filled, font=font, fontSize=fontSize, 7629 fontStyle=fontStyle, fontWeight=fontWeight, height=height, 7630 href=href, interpolate=interpolate, limit=limit, 7631 opacity=opacity, order=order, orient=orient, radius=radius, 7632 shape=shape, size=size, stroke=stroke, strokeCap=strokeCap, 7633 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 7634 strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit, 7635 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 7636 tension=tension, text=text, theta=theta, tooltip=tooltip, 7637 width=width, x=x, x2=x2, y=y, y2=y2, **kwds) 7638 7639 7640class MarkDef(AnyMark): 7641 """MarkDef schema wrapper 7642 7643 Mapping(required=[type]) 7644 7645 Attributes 7646 ---------- 7647 7648 type : :class:`Mark` 7649 The mark type. This could a primitive mark type 7650 (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``, 7651 ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` ) 7652 or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ). 7653 align : :class:`Align` 7654 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 7655 angle : float 7656 The rotation angle of the text, in degrees. 7657 baseline : :class:`TextBaseline` 7658 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 7659 7660 **Default value:** ``"middle"`` 7661 binSpacing : float 7662 Offset between bars for binned field. Ideal value for this is either 0 (Preferred 7663 by statisticians) or 1 (Vega-Lite Default, D3 example style). 7664 7665 **Default value:** ``1`` 7666 clip : boolean 7667 Whether a mark be clipped to the enclosing group’s width and height. 7668 color : :class:`Color` 7669 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 7670 ``color`` and will override ``color``. 7671 7672 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 7673 ``"#4682b4"`` 7674 7675 **Note:** This property cannot be used in a `style config 7676 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 7677 cornerRadius : float 7678 The radius in pixels of rounded rectangle corners. 7679 7680 **Default value:** ``0`` 7681 cursor : :class:`Cursor` 7682 The mouse cursor used over the mark. Any valid `CSS cursor type 7683 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 7684 dir : :class:`Dir` 7685 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 7686 (right-to-left). This property determines on which side is truncated in response to 7687 the limit parameter. 7688 7689 **Default value:** ``"ltr"`` 7690 dx : float 7691 The horizontal offset, in pixels, between the text label and its anchor point. The 7692 offset is applied after rotation by the *angle* property. 7693 dy : float 7694 The vertical offset, in pixels, between the text label and its anchor point. The 7695 offset is applied after rotation by the *angle* property. 7696 ellipsis : string 7697 The ellipsis string for text truncated in response to the limit parameter. 7698 7699 **Default value:** ``"…"`` 7700 fill : :class:`Color` 7701 Default Fill Color. This has higher precedence than ``config.color`` 7702 7703 **Default value:** (None) 7704 fillOpacity : float 7705 The fill opacity (value between [0,1]). 7706 7707 **Default value:** ``1`` 7708 filled : boolean 7709 Whether the mark's color should be used as fill color instead of stroke color. 7710 7711 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 7712 ``true``. 7713 7714 **Note:** This property cannot be used in a `style config 7715 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 7716 font : string 7717 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 7718 fontSize : float 7719 The font size, in pixels. 7720 fontStyle : :class:`FontStyle` 7721 The font style (e.g., ``"italic"`` ). 7722 fontWeight : :class:`FontWeight` 7723 The font weight. 7724 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 7725 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 7726 ). 7727 height : float 7728 Height of the marks. 7729 href : string 7730 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 7731 interpolate : :class:`Interpolate` 7732 The line interpolation method to use for line and area marks. One of the following: 7733 7734 7735 * ``"linear"`` : piecewise linear segments, as in a polyline. 7736 * ``"linear-closed"`` : close the linear segments to form a polygon. 7737 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 7738 function. 7739 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 7740 step function. 7741 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 7742 step function. 7743 * ``"basis"`` : a B-spline, with control point duplication on the ends. 7744 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 7745 * ``"basis-closed"`` : a closed B-spline, as in a loop. 7746 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 7747 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 7748 but will intersect other control points. 7749 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 7750 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 7751 straighten the spline. 7752 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 7753 limit : float 7754 The maximum length of the text mark in pixels. The text value will be automatically 7755 truncated if the rendered size exceeds the limit. 7756 7757 **Default value:** ``0``, indicating no limit 7758 line : anyOf(boolean, :class:`OverlayMarkDef`) 7759 A flag for overlaying line on top of area marks, or an object defining the 7760 properties of the overlayed lines. 7761 7762 7763 If this value is an empty object ( ``{}`` ) or ``true``, lines with default 7764 properties will be used. 7765 7766 If this value is ``false``, no lines would be automatically added to area marks. 7767 7768 **Default value:** ``false``. 7769 opacity : float 7770 The overall opacity (value between [0,1]). 7771 7772 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 7773 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 7774 order : anyOf(None, boolean) 7775 For line and trail marks, this ``order`` property can be set to ``null`` or 7776 ``false`` to make the lines use the original order in the data sources. 7777 orient : :class:`Orientation` 7778 The orientation of a non-stacked bar, tick, area, and line charts. 7779 The value is either horizontal (default) or vertical. 7780 7781 7782 * For bar, rule and tick, this determines whether the size of the bar and tick 7783 should be applied to x or y dimension. 7784 * For area, this property determines the orient property of the Vega output. 7785 * For line and trail marks, this property determines the sort order of the points in 7786 the line 7787 if ``config.sortLineBy`` is not specified. 7788 For stacked charts, this is always determined by the orientation of the stack; 7789 therefore explicitly specified value will be ignored. 7790 point : anyOf(boolean, :class:`OverlayMarkDef`, enum('transparent')) 7791 A flag for overlaying points on top of line or area marks, or an object defining the 7792 properties of the overlayed points. 7793 7794 7795 If this property is ``"transparent"``, transparent points will be used (for 7796 enhancing tooltips and selections). 7797 7798 If this property is an empty object ( ``{}`` ) or ``true``, filled points with 7799 default properties will be used. 7800 7801 If this property is ``false``, no points would be automatically added to line or 7802 area marks. 7803 7804 **Default value:** ``false``. 7805 radius : float 7806 Polar coordinate radial offset, in pixels, of the text label from the origin 7807 determined by the ``x`` and ``y`` properties. 7808 shape : string 7809 Shape of the point marks. Supported values include: 7810 7811 7812 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 7813 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 7814 ``"triangle-left"``. 7815 * the line symbol ``"stroke"`` 7816 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 7817 * a custom `SVG path string 7818 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 7819 sizing, custom shape paths should be defined within a square bounding box with 7820 coordinates ranging from -1 to 1 along both the x and y dimensions.) 7821 7822 **Default value:** ``"circle"`` 7823 size : float 7824 Default size for marks. 7825 7826 7827 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 7828 marks. For example: in the case of circles, the radius is determined in part by 7829 the square root of the size value. 7830 * For ``bar``, this represents the band size of the bar, in pixels. 7831 * For ``text``, this represents the font size, in pixels. 7832 7833 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 7834 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 7835 ``11`` for text marks. 7836 stroke : :class:`Color` 7837 Default Stroke Color. This has higher precedence than ``config.color`` 7838 7839 **Default value:** (None) 7840 strokeCap : :class:`StrokeCap` 7841 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 7842 ``"square"``. 7843 7844 **Default value:** ``"square"`` 7845 strokeDash : List(float) 7846 An array of alternating stroke, space lengths for creating dashed or dotted lines. 7847 strokeDashOffset : float 7848 The offset (in pixels) into which to begin drawing with the stroke dash array. 7849 strokeJoin : :class:`StrokeJoin` 7850 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 7851 7852 **Default value:** ``"miter"`` 7853 strokeMiterLimit : float 7854 The miter limit at which to bevel a line join. 7855 strokeOpacity : float 7856 The stroke opacity (value between [0,1]). 7857 7858 **Default value:** ``1`` 7859 strokeWidth : float 7860 The stroke width, in pixels. 7861 style : anyOf(string, List(string)) 7862 A string or array of strings indicating the name of custom styles to apply to the 7863 mark. A style is a named collection of mark property defaults defined within the 7864 `style configuration 7865 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an 7866 array, later styles will override earlier styles. Any `mark properties 7867 <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly 7868 defined within the ``encoding`` will override a style default. 7869 7870 **Default value:** The mark's name. For example, a bar mark will have style 7871 ``"bar"`` by default. 7872 **Note:** Any specified style will augment the default style. For example, a bar 7873 mark with ``"style": "foo"`` will receive from ``config.style.bar`` and 7874 ``config.style.foo`` (the specified style ``"foo"`` has higher precedence). 7875 tension : float 7876 Depending on the interpolation type, sets the tension parameter (for line and area 7877 marks). 7878 text : string 7879 Placeholder text if the ``text`` channel is not specified 7880 theta : float 7881 Polar coordinate angle, in radians, of the text label from the origin determined by 7882 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 7883 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 7884 radians, with ``0`` indicating "north". 7885 thickness : float 7886 Thickness of the tick mark. 7887 7888 **Default value:** ``1`` 7889 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 7890 The tooltip text string to show upon mouse hover or an object defining which fields 7891 should the tooltip be derived from. 7892 7893 7894 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 7895 will be used. 7896 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 7897 highlighted data point will be used. 7898 * If set to ``null``, then no tooltip will be used. 7899 width : float 7900 Width of the marks. 7901 x : anyOf(float, enum('width')) 7902 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 7903 specified ``x2`` or ``width``. 7904 7905 The ``value`` of this channel can be a number or a string ``"width"`` for the width 7906 of the plot. 7907 x2 : anyOf(float, enum('width')) 7908 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 7909 7910 The ``value`` of this channel can be a number or a string ``"width"`` for the width 7911 of the plot. 7912 x2Offset : float 7913 Offset for x2-position. 7914 xOffset : float 7915 Offset for x-position. 7916 y : anyOf(float, enum('height')) 7917 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 7918 specified ``y2`` or ``height``. 7919 7920 The ``value`` of this channel can be a number or a string ``"height"`` for the 7921 height of the plot. 7922 y2 : anyOf(float, enum('width')) 7923 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 7924 7925 The ``value`` of this channel can be a number or a string ``"height"`` for the 7926 height of the plot. 7927 y2Offset : float 7928 Offset for y2-position. 7929 yOffset : float 7930 Offset for y-position. 7931 """ 7932 _schema = {'$ref': '#/definitions/MarkDef'} 7933 7934 def __init__(self, type=Undefined, align=Undefined, angle=Undefined, baseline=Undefined, 7935 binSpacing=Undefined, clip=Undefined, color=Undefined, cornerRadius=Undefined, 7936 cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, 7937 fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, 7938 fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, 7939 href=Undefined, interpolate=Undefined, limit=Undefined, line=Undefined, 7940 opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined, 7941 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 7942 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 7943 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 7944 strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined, 7945 theta=Undefined, thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, 7946 x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, 7947 y2Offset=Undefined, yOffset=Undefined, **kwds): 7948 super(MarkDef, self).__init__(type=type, align=align, angle=angle, baseline=baseline, 7949 binSpacing=binSpacing, clip=clip, color=color, 7950 cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy, 7951 ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, 7952 filled=filled, font=font, fontSize=fontSize, fontStyle=fontStyle, 7953 fontWeight=fontWeight, height=height, href=href, 7954 interpolate=interpolate, limit=limit, line=line, opacity=opacity, 7955 order=order, orient=orient, point=point, radius=radius, 7956 shape=shape, size=size, stroke=stroke, strokeCap=strokeCap, 7957 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 7958 strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit, 7959 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, 7960 tension=tension, text=text, theta=theta, thickness=thickness, 7961 tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset, 7962 xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, 7963 **kwds) 7964 7965 7966class Month(VegaLiteSchema): 7967 """Month schema wrapper 7968 7969 float 7970 """ 7971 _schema = {'$ref': '#/definitions/Month'} 7972 7973 def __init__(self, *args): 7974 super(Month, self).__init__(*args) 7975 7976 7977class MultiSelectionConfig(VegaLiteSchema): 7978 """MultiSelectionConfig schema wrapper 7979 7980 Mapping(required=[]) 7981 7982 Attributes 7983 ---------- 7984 7985 clear : anyOf(:class:`EventStream`, boolean) 7986 Clears the selection, emptying it of all values. Can be an 7987 `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to 7988 disable. 7989 7990 **Default value:** ``dblclick``. 7991 7992 **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__ 7993 documentation. 7994 empty : enum('all', 'none') 7995 By default, ``all`` data values are considered to lie within an empty selection. 7996 When set to ``none``, empty selections contain no data values. 7997 encodings : List(:class:`SingleDefUnitChannel`) 7998 An array of encoding channels. The corresponding data field values 7999 must match for a data tuple to fall within the selection. 8000 8001 **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__ 8002 documentation. 8003 fields : List(:class:`FieldName`) 8004 An array of field names whose values must match for a data tuple to 8005 fall within the selection. 8006 8007 **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__ 8008 documentation. 8009 init : anyOf(:class:`SelectionInitMapping`, List(:class:`SelectionInitMapping`)) 8010 Initialize the selection with a mapping between `projected channels or field names 8011 <https://vega.github.io/vega-lite/docs/project.html>`__ and an initial 8012 value (or array of values). 8013 8014 **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__ 8015 documentation. 8016 nearest : boolean 8017 When true, an invisible voronoi diagram is computed to accelerate discrete 8018 selection. The data value *nearest* the mouse cursor is added to the selection. 8019 8020 **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__ 8021 documentation. 8022 on : :class:`EventStream` 8023 A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or 8024 selector) that triggers the selection. 8025 For interval selections, the event stream must specify a `start and end 8026 <https://vega.github.io/vega/docs/event-streams/#between-filters>`__. 8027 resolve : :class:`SelectionResolution` 8028 With layered and multi-view displays, a strategy that determines how 8029 selections' data queries are resolved when applied in a filter transform, 8030 conditional encoding rule, or scale domain. 8031 8032 **See also:** `resolve 8033 <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation. 8034 toggle : anyOf(string, boolean) 8035 Controls whether data values should be toggled or only ever inserted into 8036 multi selections. Can be ``true``, ``false`` (for insertion only), or a 8037 `Vega expression <https://vega.github.io/vega/docs/expressions/>`__. 8038 8039 **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e., 8040 data values are toggled when a user interacts with the shift-key pressed). 8041 8042 **See also:** `toggle <https://vega.github.io/vega-lite/docs/toggle.html>`__ 8043 documentation. 8044 """ 8045 _schema = {'$ref': '#/definitions/MultiSelectionConfig'} 8046 8047 def __init__(self, clear=Undefined, empty=Undefined, encodings=Undefined, fields=Undefined, 8048 init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined, toggle=Undefined, 8049 **kwds): 8050 super(MultiSelectionConfig, self).__init__(clear=clear, empty=empty, encodings=encodings, 8051 fields=fields, init=init, nearest=nearest, on=on, 8052 resolve=resolve, toggle=toggle, **kwds) 8053 8054 8055class NamedData(DataSource): 8056 """NamedData schema wrapper 8057 8058 Mapping(required=[name]) 8059 8060 Attributes 8061 ---------- 8062 8063 name : string 8064 Provide a placeholder name and bind data at runtime. 8065 format : :class:`DataFormat` 8066 An object that specifies the format for parsing the data. 8067 """ 8068 _schema = {'$ref': '#/definitions/NamedData'} 8069 8070 def __init__(self, name=Undefined, format=Undefined, **kwds): 8071 super(NamedData, self).__init__(name=name, format=format, **kwds) 8072 8073 8074class NiceTime(VegaLiteSchema): 8075 """NiceTime schema wrapper 8076 8077 enum('second', 'minute', 'hour', 'day', 'week', 'month', 'year') 8078 """ 8079 _schema = {'$ref': '#/definitions/NiceTime'} 8080 8081 def __init__(self, *args): 8082 super(NiceTime, self).__init__(*args) 8083 8084 8085class NumberValueDef(VegaLiteSchema): 8086 """NumberValueDef schema wrapper 8087 8088 Mapping(required=[value]) 8089 Definition object for a constant value of an encoding channel. 8090 8091 Attributes 8092 ---------- 8093 8094 value : float 8095 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 8096 between ``0`` to ``1`` for opacity). 8097 """ 8098 _schema = {'$ref': '#/definitions/NumberValueDef'} 8099 8100 def __init__(self, value=Undefined, **kwds): 8101 super(NumberValueDef, self).__init__(value=value, **kwds) 8102 8103 8104class NumericFieldDefWithCondition(VegaLiteSchema): 8105 """NumericFieldDefWithCondition schema wrapper 8106 8107 Mapping(required=[type]) 8108 A FieldDef with Condition :raw-html:`<ValueDef>` 8109 8110 Attributes 8111 ---------- 8112 8113 type : :class:`StandardType` 8114 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 8115 ``"ordinal"``, or ``"nominal"`` ). 8116 It can also be a ``"geojson"`` type for encoding `'geoshape' 8117 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 8118 8119 **Note:** 8120 8121 8122 * Data values for a temporal field can be either a date-time string (e.g., 8123 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 8124 timestamp number (e.g., ``1552199579097`` ). 8125 * Data ``type`` describes the semantics of the data rather than the primitive data 8126 types ( ``number``, ``string``, etc.). The same primitive data type can have 8127 different types of measurement. For example, numeric data can represent 8128 quantitative, ordinal, or nominal data. 8129 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 8130 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 8131 or `"ordinal" (for using an ordinal bin scale) 8132 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 8133 * When using with `timeUnit 8134 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 8135 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 8136 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 8137 * When using with `aggregate 8138 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 8139 refers to the post-aggregation data type. For example, we can calculate count 8140 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 8141 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 8142 is ``"quantitative"``. 8143 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 8144 ``type`` as they have exactly the same type as their primary channels (e.g., 8145 ``x``, ``y`` ). 8146 8147 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 8148 documentation. 8149 aggregate : :class:`Aggregate` 8150 Aggregation function for the field 8151 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 8152 8153 **Default value:** ``undefined`` (None) 8154 8155 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 8156 documentation. 8157 bin : anyOf(boolean, :class:`BinParams`, None) 8158 A flag for binning a ``quantitative`` field, `an object defining binning parameters 8159 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 8160 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 8161 ``"binned"`` ). 8162 8163 8164 If ``true``, default `binning parameters 8165 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 8166 8167 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 8168 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 8169 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 8170 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 8171 set the axis's `tickMinStep 8172 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 8173 8174 **Default value:** ``false`` 8175 8176 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 8177 documentation. 8178 condition : anyOf(:class:`ConditionalNumberValueDef`, 8179 List(:class:`ConditionalNumberValueDef`)) 8180 One or more value definition(s) with `a selection or a test predicate 8181 <https://vega.github.io/vega-lite/docs/condition.html>`__. 8182 8183 **Note:** A field definition's ``condition`` property can only contain `conditional 8184 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 8185 since Vega-Lite only allows at most one encoded field per encoding channel. 8186 field : :class:`Field` 8187 **Required.** A string defining the name of the field from which to pull a data 8188 value 8189 or an object defining iterated values from the `repeat 8190 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 8191 8192 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 8193 documentation. 8194 8195 **Notes:** 8196 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 8197 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 8198 If field names contain dots or brackets but are not nested, you can use ``\\`` to 8199 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 8200 See more details about escaping in the `field documentation 8201 <https://vega.github.io/vega-lite/docs/field.html>`__. 8202 2) ``field`` is not required if ``aggregate`` is ``count``. 8203 legend : anyOf(:class:`Legend`, None) 8204 An object defining properties of the legend. 8205 If ``null``, the legend for the encoding channel will be removed. 8206 8207 **Default value:** If undefined, default `legend properties 8208 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 8209 8210 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 8211 documentation. 8212 scale : anyOf(:class:`Scale`, None) 8213 An object defining properties of the channel's scale, which is the function that 8214 transforms values in the data domain (numbers, dates, strings, etc) to visual values 8215 (pixels, colors, sizes) of the encoding channels. 8216 8217 If ``null``, the scale will be `disabled and the data value will be directly encoded 8218 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 8219 8220 **Default value:** If undefined, default `scale properties 8221 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 8222 8223 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 8224 documentation. 8225 sort : :class:`Sort` 8226 Sort order for the encoded field. 8227 8228 For continuous fields (quantitative or temporal), ``sort`` can be either 8229 ``"ascending"`` or ``"descending"``. 8230 8231 For discrete fields, ``sort`` can be one of the following: 8232 8233 8234 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 8235 Javascript. 8236 * `A sort-by-encoding definition 8237 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 8238 by another encoding channel. (This type of sort definition is not available for 8239 ``row`` and ``column`` channels.) 8240 * `A sort field definition 8241 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 8242 another field. 8243 * `An array specifying the field values in preferred order 8244 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 8245 sort order will obey the values in the array, followed by any unspecified values 8246 in their original order. For discrete time field, values in the sort array can be 8247 `date-time definition objects <types#datetime>`__. In addition, for time units 8248 ``"month"`` and ``"day"``, the values can be the month or day names (case 8249 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 8250 * ``null`` indicating no sort. 8251 8252 **Default value:** ``"ascending"`` 8253 8254 **Note:** ``null`` is not supported for ``row`` and ``column``. 8255 8256 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 8257 documentation. 8258 timeUnit : :class:`TimeUnit` 8259 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 8260 field. 8261 or `a temporal field that gets casted as ordinal 8262 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 8263 8264 **Default value:** ``undefined`` (None) 8265 8266 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 8267 documentation. 8268 title : anyOf(string, None) 8269 A title for the field. If ``null``, the title will be removed. 8270 8271 **Default value:** derived from the field's name and transformation function ( 8272 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 8273 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 8274 field is binned or has a time unit applied, the applied function is shown in 8275 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 8276 Otherwise, the title is simply the field name. 8277 8278 **Notes** : 8279 8280 1) You can customize the default field title format by providing the `fieldTitle 8281 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 8282 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 8283 function via the compile function's options 8284 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 8285 8286 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 8287 defined, axis/header/legend title will be used. 8288 """ 8289 _schema = {'$ref': '#/definitions/NumericFieldDefWithCondition'} 8290 8291 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 8292 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 8293 title=Undefined, **kwds): 8294 super(NumericFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin, 8295 condition=condition, field=field, 8296 legend=legend, scale=scale, sort=sort, 8297 timeUnit=timeUnit, title=title, **kwds) 8298 8299 8300class NumericValueDefWithCondition(VegaLiteSchema): 8301 """NumericValueDefWithCondition schema wrapper 8302 8303 Mapping(required=[]) 8304 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 8305 optional. 8306 8307 Attributes 8308 ---------- 8309 8310 condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`, 8311 List(:class:`ConditionalNumberValueDef`)) 8312 A field definition or one or more value definition(s) with a selection predicate. 8313 value : float 8314 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 8315 between ``0`` to ``1`` for opacity). 8316 """ 8317 _schema = {'$ref': '#/definitions/NumericValueDefWithCondition'} 8318 8319 def __init__(self, condition=Undefined, value=Undefined, **kwds): 8320 super(NumericValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds) 8321 8322 8323class OrderFieldDef(VegaLiteSchema): 8324 """OrderFieldDef schema wrapper 8325 8326 Mapping(required=[type]) 8327 8328 Attributes 8329 ---------- 8330 8331 type : :class:`StandardType` 8332 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 8333 ``"ordinal"``, or ``"nominal"`` ). 8334 It can also be a ``"geojson"`` type for encoding `'geoshape' 8335 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 8336 8337 **Note:** 8338 8339 8340 * Data values for a temporal field can be either a date-time string (e.g., 8341 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 8342 timestamp number (e.g., ``1552199579097`` ). 8343 * Data ``type`` describes the semantics of the data rather than the primitive data 8344 types ( ``number``, ``string``, etc.). The same primitive data type can have 8345 different types of measurement. For example, numeric data can represent 8346 quantitative, ordinal, or nominal data. 8347 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 8348 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 8349 or `"ordinal" (for using an ordinal bin scale) 8350 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 8351 * When using with `timeUnit 8352 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 8353 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 8354 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 8355 * When using with `aggregate 8356 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 8357 refers to the post-aggregation data type. For example, we can calculate count 8358 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 8359 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 8360 is ``"quantitative"``. 8361 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 8362 ``type`` as they have exactly the same type as their primary channels (e.g., 8363 ``x``, ``y`` ). 8364 8365 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 8366 documentation. 8367 aggregate : :class:`Aggregate` 8368 Aggregation function for the field 8369 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 8370 8371 **Default value:** ``undefined`` (None) 8372 8373 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 8374 documentation. 8375 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 8376 A flag for binning a ``quantitative`` field, `an object defining binning parameters 8377 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 8378 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 8379 ``"binned"`` ). 8380 8381 8382 If ``true``, default `binning parameters 8383 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 8384 8385 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 8386 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 8387 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 8388 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 8389 set the axis's `tickMinStep 8390 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 8391 8392 **Default value:** ``false`` 8393 8394 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 8395 documentation. 8396 field : :class:`Field` 8397 **Required.** A string defining the name of the field from which to pull a data 8398 value 8399 or an object defining iterated values from the `repeat 8400 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 8401 8402 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 8403 documentation. 8404 8405 **Notes:** 8406 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 8407 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 8408 If field names contain dots or brackets but are not nested, you can use ``\\`` to 8409 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 8410 See more details about escaping in the `field documentation 8411 <https://vega.github.io/vega-lite/docs/field.html>`__. 8412 2) ``field`` is not required if ``aggregate`` is ``count``. 8413 sort : :class:`SortOrder` 8414 The sort order. One of ``"ascending"`` (default) or ``"descending"``. 8415 timeUnit : :class:`TimeUnit` 8416 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 8417 field. 8418 or `a temporal field that gets casted as ordinal 8419 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 8420 8421 **Default value:** ``undefined`` (None) 8422 8423 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 8424 documentation. 8425 title : anyOf(string, None) 8426 A title for the field. If ``null``, the title will be removed. 8427 8428 **Default value:** derived from the field's name and transformation function ( 8429 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 8430 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 8431 field is binned or has a time unit applied, the applied function is shown in 8432 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 8433 Otherwise, the title is simply the field name. 8434 8435 **Notes** : 8436 8437 1) You can customize the default field title format by providing the `fieldTitle 8438 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 8439 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 8440 function via the compile function's options 8441 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 8442 8443 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 8444 defined, axis/header/legend title will be used. 8445 """ 8446 _schema = {'$ref': '#/definitions/OrderFieldDef'} 8447 8448 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined, 8449 sort=Undefined, timeUnit=Undefined, title=Undefined, **kwds): 8450 super(OrderFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field, 8451 sort=sort, timeUnit=timeUnit, title=title, **kwds) 8452 8453 8454class Orient(VegaLiteSchema): 8455 """Orient schema wrapper 8456 8457 enum('left', 'right', 'top', 'bottom') 8458 """ 8459 _schema = {'$ref': '#/definitions/Orient'} 8460 8461 def __init__(self, *args): 8462 super(Orient, self).__init__(*args) 8463 8464 8465class Orientation(VegaLiteSchema): 8466 """Orientation schema wrapper 8467 8468 enum('horizontal', 'vertical') 8469 """ 8470 _schema = {'$ref': '#/definitions/Orientation'} 8471 8472 def __init__(self, *args): 8473 super(Orientation, self).__init__(*args) 8474 8475 8476class OverlayMarkDef(VegaLiteSchema): 8477 """OverlayMarkDef schema wrapper 8478 8479 Mapping(required=[]) 8480 8481 Attributes 8482 ---------- 8483 8484 align : :class:`Align` 8485 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 8486 angle : float 8487 The rotation angle of the text, in degrees. 8488 baseline : :class:`TextBaseline` 8489 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 8490 8491 **Default value:** ``"middle"`` 8492 clip : boolean 8493 Whether a mark be clipped to the enclosing group’s width and height. 8494 color : :class:`Color` 8495 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 8496 ``color`` and will override ``color``. 8497 8498 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 8499 ``"#4682b4"`` 8500 8501 **Note:** This property cannot be used in a `style config 8502 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 8503 cornerRadius : float 8504 The radius in pixels of rounded rectangle corners. 8505 8506 **Default value:** ``0`` 8507 cursor : :class:`Cursor` 8508 The mouse cursor used over the mark. Any valid `CSS cursor type 8509 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 8510 dir : :class:`Dir` 8511 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 8512 (right-to-left). This property determines on which side is truncated in response to 8513 the limit parameter. 8514 8515 **Default value:** ``"ltr"`` 8516 dx : float 8517 The horizontal offset, in pixels, between the text label and its anchor point. The 8518 offset is applied after rotation by the *angle* property. 8519 dy : float 8520 The vertical offset, in pixels, between the text label and its anchor point. The 8521 offset is applied after rotation by the *angle* property. 8522 ellipsis : string 8523 The ellipsis string for text truncated in response to the limit parameter. 8524 8525 **Default value:** ``"…"`` 8526 fill : :class:`Color` 8527 Default Fill Color. This has higher precedence than ``config.color`` 8528 8529 **Default value:** (None) 8530 fillOpacity : float 8531 The fill opacity (value between [0,1]). 8532 8533 **Default value:** ``1`` 8534 filled : boolean 8535 Whether the mark's color should be used as fill color instead of stroke color. 8536 8537 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 8538 ``true``. 8539 8540 **Note:** This property cannot be used in a `style config 8541 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 8542 font : string 8543 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 8544 fontSize : float 8545 The font size, in pixels. 8546 fontStyle : :class:`FontStyle` 8547 The font style (e.g., ``"italic"`` ). 8548 fontWeight : :class:`FontWeight` 8549 The font weight. 8550 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 8551 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 8552 ). 8553 height : float 8554 Height of the marks. 8555 href : string 8556 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 8557 interpolate : :class:`Interpolate` 8558 The line interpolation method to use for line and area marks. One of the following: 8559 8560 8561 * ``"linear"`` : piecewise linear segments, as in a polyline. 8562 * ``"linear-closed"`` : close the linear segments to form a polygon. 8563 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 8564 function. 8565 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 8566 step function. 8567 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 8568 step function. 8569 * ``"basis"`` : a B-spline, with control point duplication on the ends. 8570 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 8571 * ``"basis-closed"`` : a closed B-spline, as in a loop. 8572 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 8573 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 8574 but will intersect other control points. 8575 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 8576 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 8577 straighten the spline. 8578 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 8579 limit : float 8580 The maximum length of the text mark in pixels. The text value will be automatically 8581 truncated if the rendered size exceeds the limit. 8582 8583 **Default value:** ``0``, indicating no limit 8584 opacity : float 8585 The overall opacity (value between [0,1]). 8586 8587 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 8588 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 8589 order : anyOf(None, boolean) 8590 For line and trail marks, this ``order`` property can be set to ``null`` or 8591 ``false`` to make the lines use the original order in the data sources. 8592 orient : :class:`Orientation` 8593 The orientation of a non-stacked bar, tick, area, and line charts. 8594 The value is either horizontal (default) or vertical. 8595 8596 8597 * For bar, rule and tick, this determines whether the size of the bar and tick 8598 should be applied to x or y dimension. 8599 * For area, this property determines the orient property of the Vega output. 8600 * For line and trail marks, this property determines the sort order of the points in 8601 the line 8602 if ``config.sortLineBy`` is not specified. 8603 For stacked charts, this is always determined by the orientation of the stack; 8604 therefore explicitly specified value will be ignored. 8605 radius : float 8606 Polar coordinate radial offset, in pixels, of the text label from the origin 8607 determined by the ``x`` and ``y`` properties. 8608 shape : string 8609 Shape of the point marks. Supported values include: 8610 8611 8612 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 8613 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 8614 ``"triangle-left"``. 8615 * the line symbol ``"stroke"`` 8616 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 8617 * a custom `SVG path string 8618 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 8619 sizing, custom shape paths should be defined within a square bounding box with 8620 coordinates ranging from -1 to 1 along both the x and y dimensions.) 8621 8622 **Default value:** ``"circle"`` 8623 size : float 8624 Default size for marks. 8625 8626 8627 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 8628 marks. For example: in the case of circles, the radius is determined in part by 8629 the square root of the size value. 8630 * For ``bar``, this represents the band size of the bar, in pixels. 8631 * For ``text``, this represents the font size, in pixels. 8632 8633 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 8634 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 8635 ``11`` for text marks. 8636 stroke : :class:`Color` 8637 Default Stroke Color. This has higher precedence than ``config.color`` 8638 8639 **Default value:** (None) 8640 strokeCap : :class:`StrokeCap` 8641 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 8642 ``"square"``. 8643 8644 **Default value:** ``"square"`` 8645 strokeDash : List(float) 8646 An array of alternating stroke, space lengths for creating dashed or dotted lines. 8647 strokeDashOffset : float 8648 The offset (in pixels) into which to begin drawing with the stroke dash array. 8649 strokeJoin : :class:`StrokeJoin` 8650 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 8651 8652 **Default value:** ``"miter"`` 8653 strokeMiterLimit : float 8654 The miter limit at which to bevel a line join. 8655 strokeOpacity : float 8656 The stroke opacity (value between [0,1]). 8657 8658 **Default value:** ``1`` 8659 strokeWidth : float 8660 The stroke width, in pixels. 8661 style : anyOf(string, List(string)) 8662 A string or array of strings indicating the name of custom styles to apply to the 8663 mark. A style is a named collection of mark property defaults defined within the 8664 `style configuration 8665 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an 8666 array, later styles will override earlier styles. Any `mark properties 8667 <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly 8668 defined within the ``encoding`` will override a style default. 8669 8670 **Default value:** The mark's name. For example, a bar mark will have style 8671 ``"bar"`` by default. 8672 **Note:** Any specified style will augment the default style. For example, a bar 8673 mark with ``"style": "foo"`` will receive from ``config.style.bar`` and 8674 ``config.style.foo`` (the specified style ``"foo"`` has higher precedence). 8675 tension : float 8676 Depending on the interpolation type, sets the tension parameter (for line and area 8677 marks). 8678 text : string 8679 Placeholder text if the ``text`` channel is not specified 8680 theta : float 8681 Polar coordinate angle, in radians, of the text label from the origin determined by 8682 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 8683 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 8684 radians, with ``0`` indicating "north". 8685 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 8686 The tooltip text string to show upon mouse hover or an object defining which fields 8687 should the tooltip be derived from. 8688 8689 8690 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 8691 will be used. 8692 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 8693 highlighted data point will be used. 8694 * If set to ``null``, then no tooltip will be used. 8695 width : float 8696 Width of the marks. 8697 x : anyOf(float, enum('width')) 8698 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 8699 specified ``x2`` or ``width``. 8700 8701 The ``value`` of this channel can be a number or a string ``"width"`` for the width 8702 of the plot. 8703 x2 : anyOf(float, enum('width')) 8704 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 8705 8706 The ``value`` of this channel can be a number or a string ``"width"`` for the width 8707 of the plot. 8708 x2Offset : float 8709 Offset for x2-position. 8710 xOffset : float 8711 Offset for x-position. 8712 y : anyOf(float, enum('height')) 8713 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 8714 specified ``y2`` or ``height``. 8715 8716 The ``value`` of this channel can be a number or a string ``"height"`` for the 8717 height of the plot. 8718 y2 : anyOf(float, enum('width')) 8719 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 8720 8721 The ``value`` of this channel can be a number or a string ``"height"`` for the 8722 height of the plot. 8723 y2Offset : float 8724 Offset for y2-position. 8725 yOffset : float 8726 Offset for y-position. 8727 """ 8728 _schema = {'$ref': '#/definitions/OverlayMarkDef'} 8729 8730 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, clip=Undefined, 8731 color=Undefined, cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, 8732 dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, 8733 filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, 8734 fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, 8735 limit=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, 8736 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 8737 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 8738 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 8739 strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined, 8740 theta=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, 8741 x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined, 8742 yOffset=Undefined, **kwds): 8743 super(OverlayMarkDef, self).__init__(align=align, angle=angle, baseline=baseline, clip=clip, 8744 color=color, cornerRadius=cornerRadius, cursor=cursor, 8745 dir=dir, dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, 8746 fillOpacity=fillOpacity, filled=filled, font=font, 8747 fontSize=fontSize, fontStyle=fontStyle, 8748 fontWeight=fontWeight, height=height, href=href, 8749 interpolate=interpolate, limit=limit, opacity=opacity, 8750 order=order, orient=orient, radius=radius, shape=shape, 8751 size=size, stroke=stroke, strokeCap=strokeCap, 8752 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 8753 strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit, 8754 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 8755 style=style, tension=tension, text=text, theta=theta, 8756 tooltip=tooltip, width=width, x=x, x2=x2, 8757 x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, 8758 y2Offset=y2Offset, yOffset=yOffset, **kwds) 8759 8760 8761class Padding(VegaLiteSchema): 8762 """Padding schema wrapper 8763 8764 anyOf(float, Mapping(required=[])) 8765 """ 8766 _schema = {'$ref': '#/definitions/Padding'} 8767 8768 def __init__(self, *args, **kwds): 8769 super(Padding, self).__init__(*args, **kwds) 8770 8771 8772class Parse(VegaLiteSchema): 8773 """Parse schema wrapper 8774 8775 Mapping(required=[]) 8776 """ 8777 _schema = {'$ref': '#/definitions/Parse'} 8778 8779 def __init__(self, **kwds): 8780 super(Parse, self).__init__(**kwds) 8781 8782 8783class ParseValue(VegaLiteSchema): 8784 """ParseValue schema wrapper 8785 8786 anyOf(None, string, enum('string'), enum('boolean'), enum('date'), enum('number')) 8787 """ 8788 _schema = {'$ref': '#/definitions/ParseValue'} 8789 8790 def __init__(self, *args, **kwds): 8791 super(ParseValue, self).__init__(*args, **kwds) 8792 8793 8794class PartsMixinsBoxPlotPart(VegaLiteSchema): 8795 """PartsMixinsBoxPlotPart schema wrapper 8796 8797 Mapping(required=[]) 8798 8799 Attributes 8800 ---------- 8801 8802 box : anyOf(boolean, :class:`MarkConfig`) 8803 8804 median : anyOf(boolean, :class:`MarkConfig`) 8805 8806 outliers : anyOf(boolean, :class:`MarkConfig`) 8807 8808 rule : anyOf(boolean, :class:`MarkConfig`) 8809 8810 ticks : anyOf(boolean, :class:`MarkConfig`) 8811 8812 """ 8813 _schema = {'$ref': '#/definitions/PartsMixins<BoxPlotPart>'} 8814 8815 def __init__(self, box=Undefined, median=Undefined, outliers=Undefined, rule=Undefined, 8816 ticks=Undefined, **kwds): 8817 super(PartsMixinsBoxPlotPart, self).__init__(box=box, median=median, outliers=outliers, 8818 rule=rule, ticks=ticks, **kwds) 8819 8820 8821class PartsMixinsErrorBandPart(VegaLiteSchema): 8822 """PartsMixinsErrorBandPart schema wrapper 8823 8824 Mapping(required=[]) 8825 8826 Attributes 8827 ---------- 8828 8829 band : anyOf(boolean, :class:`MarkConfig`) 8830 8831 borders : anyOf(boolean, :class:`MarkConfig`) 8832 8833 """ 8834 _schema = {'$ref': '#/definitions/PartsMixins<ErrorBandPart>'} 8835 8836 def __init__(self, band=Undefined, borders=Undefined, **kwds): 8837 super(PartsMixinsErrorBandPart, self).__init__(band=band, borders=borders, **kwds) 8838 8839 8840class PartsMixinsErrorBarPart(VegaLiteSchema): 8841 """PartsMixinsErrorBarPart schema wrapper 8842 8843 Mapping(required=[]) 8844 8845 Attributes 8846 ---------- 8847 8848 rule : anyOf(boolean, :class:`MarkConfig`) 8849 8850 ticks : anyOf(boolean, :class:`MarkConfig`) 8851 8852 """ 8853 _schema = {'$ref': '#/definitions/PartsMixins<ErrorBarPart>'} 8854 8855 def __init__(self, rule=Undefined, ticks=Undefined, **kwds): 8856 super(PartsMixinsErrorBarPart, self).__init__(rule=rule, ticks=ticks, **kwds) 8857 8858 8859class PositionFieldDef(VegaLiteSchema): 8860 """PositionFieldDef schema wrapper 8861 8862 Mapping(required=[type]) 8863 8864 Attributes 8865 ---------- 8866 8867 type : :class:`StandardType` 8868 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 8869 ``"ordinal"``, or ``"nominal"`` ). 8870 It can also be a ``"geojson"`` type for encoding `'geoshape' 8871 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 8872 8873 **Note:** 8874 8875 8876 * Data values for a temporal field can be either a date-time string (e.g., 8877 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 8878 timestamp number (e.g., ``1552199579097`` ). 8879 * Data ``type`` describes the semantics of the data rather than the primitive data 8880 types ( ``number``, ``string``, etc.). The same primitive data type can have 8881 different types of measurement. For example, numeric data can represent 8882 quantitative, ordinal, or nominal data. 8883 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 8884 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 8885 or `"ordinal" (for using an ordinal bin scale) 8886 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 8887 * When using with `timeUnit 8888 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 8889 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 8890 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 8891 * When using with `aggregate 8892 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 8893 refers to the post-aggregation data type. For example, we can calculate count 8894 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 8895 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 8896 is ``"quantitative"``. 8897 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 8898 ``type`` as they have exactly the same type as their primary channels (e.g., 8899 ``x``, ``y`` ). 8900 8901 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 8902 documentation. 8903 aggregate : :class:`Aggregate` 8904 Aggregation function for the field 8905 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 8906 8907 **Default value:** ``undefined`` (None) 8908 8909 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 8910 documentation. 8911 axis : anyOf(:class:`Axis`, None) 8912 An object defining properties of axis's gridlines, ticks and labels. 8913 If ``null``, the axis for the encoding channel will be removed. 8914 8915 **Default value:** If undefined, default `axis properties 8916 <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied. 8917 8918 **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__ 8919 documentation. 8920 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 8921 A flag for binning a ``quantitative`` field, `an object defining binning parameters 8922 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 8923 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 8924 ``"binned"`` ). 8925 8926 8927 If ``true``, default `binning parameters 8928 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 8929 8930 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 8931 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 8932 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 8933 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 8934 set the axis's `tickMinStep 8935 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 8936 8937 **Default value:** ``false`` 8938 8939 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 8940 documentation. 8941 field : :class:`Field` 8942 **Required.** A string defining the name of the field from which to pull a data 8943 value 8944 or an object defining iterated values from the `repeat 8945 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 8946 8947 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 8948 documentation. 8949 8950 **Notes:** 8951 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 8952 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 8953 If field names contain dots or brackets but are not nested, you can use ``\\`` to 8954 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 8955 See more details about escaping in the `field documentation 8956 <https://vega.github.io/vega-lite/docs/field.html>`__. 8957 2) ``field`` is not required if ``aggregate`` is ``count``. 8958 impute : :class:`ImputeParams` 8959 An object defining the properties of the Impute Operation to be applied. 8960 The field value of the other positional channel is taken as ``key`` of the 8961 ``Impute`` Operation. 8962 The field of the ``color`` channel if specified is used as ``groupby`` of the 8963 ``Impute`` Operation. 8964 8965 **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__ 8966 documentation. 8967 scale : anyOf(:class:`Scale`, None) 8968 An object defining properties of the channel's scale, which is the function that 8969 transforms values in the data domain (numbers, dates, strings, etc) to visual values 8970 (pixels, colors, sizes) of the encoding channels. 8971 8972 If ``null``, the scale will be `disabled and the data value will be directly encoded 8973 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 8974 8975 **Default value:** If undefined, default `scale properties 8976 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 8977 8978 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 8979 documentation. 8980 sort : :class:`Sort` 8981 Sort order for the encoded field. 8982 8983 For continuous fields (quantitative or temporal), ``sort`` can be either 8984 ``"ascending"`` or ``"descending"``. 8985 8986 For discrete fields, ``sort`` can be one of the following: 8987 8988 8989 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 8990 Javascript. 8991 * `A sort-by-encoding definition 8992 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 8993 by another encoding channel. (This type of sort definition is not available for 8994 ``row`` and ``column`` channels.) 8995 * `A sort field definition 8996 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 8997 another field. 8998 * `An array specifying the field values in preferred order 8999 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 9000 sort order will obey the values in the array, followed by any unspecified values 9001 in their original order. For discrete time field, values in the sort array can be 9002 `date-time definition objects <types#datetime>`__. In addition, for time units 9003 ``"month"`` and ``"day"``, the values can be the month or day names (case 9004 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 9005 * ``null`` indicating no sort. 9006 9007 **Default value:** ``"ascending"`` 9008 9009 **Note:** ``null`` is not supported for ``row`` and ``column``. 9010 9011 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 9012 documentation. 9013 stack : anyOf(:class:`StackOffset`, None, boolean) 9014 Type of stacking offset if the field should be stacked. 9015 ``stack`` is only applicable for ``x`` and ``y`` channels with continuous domains. 9016 For example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar 9017 chart. 9018 9019 ``stack`` can be one of the following values: 9020 9021 9022 * ``"zero"`` or `true`: stacking with baseline offset at zero value of the scale 9023 (for creating typical stacked 9024 [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area 9025 <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). 9026 * ``"normalize"`` - stacking with normalized domain (for creating `normalized 9027 stacked bar and area charts 9028 <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__. 9029 :raw-html:`<br/>` 9030 - ``"center"`` - stacking with center baseline (for `streamgraph 9031 <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). 9032 * ``null`` or ``false`` - No-stacking. This will produce layered `bar 9033 <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area 9034 chart. 9035 9036 **Default value:** ``zero`` for plots with all of the following conditions are true: 9037 (1) the mark is ``bar`` or ``area`` ; 9038 (2) the stacked measure channel (x or y) has a linear scale; 9039 (3) At least one of non-position channels mapped to an unaggregated field that is 9040 different from x and y. Otherwise, ``null`` by default. 9041 9042 **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__ 9043 documentation. 9044 timeUnit : :class:`TimeUnit` 9045 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 9046 field. 9047 or `a temporal field that gets casted as ordinal 9048 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 9049 9050 **Default value:** ``undefined`` (None) 9051 9052 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 9053 documentation. 9054 title : anyOf(string, None) 9055 A title for the field. If ``null``, the title will be removed. 9056 9057 **Default value:** derived from the field's name and transformation function ( 9058 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 9059 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 9060 field is binned or has a time unit applied, the applied function is shown in 9061 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 9062 Otherwise, the title is simply the field name. 9063 9064 **Notes** : 9065 9066 1) You can customize the default field title format by providing the `fieldTitle 9067 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 9068 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 9069 function via the compile function's options 9070 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 9071 9072 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 9073 defined, axis/header/legend title will be used. 9074 """ 9075 _schema = {'$ref': '#/definitions/PositionFieldDef'} 9076 9077 def __init__(self, type=Undefined, aggregate=Undefined, axis=Undefined, bin=Undefined, 9078 field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined, stack=Undefined, 9079 timeUnit=Undefined, title=Undefined, **kwds): 9080 super(PositionFieldDef, self).__init__(type=type, aggregate=aggregate, axis=axis, bin=bin, 9081 field=field, impute=impute, scale=scale, sort=sort, 9082 stack=stack, timeUnit=timeUnit, title=title, **kwds) 9083 9084 9085class Predicate(LogicalOperandPredicate): 9086 """Predicate schema wrapper 9087 9088 anyOf(:class:`FieldEqualPredicate`, :class:`FieldRangePredicate`, 9089 :class:`FieldOneOfPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTPredicate`, 9090 :class:`FieldLTEPredicate`, :class:`FieldGTEPredicate`, :class:`FieldValidPredicate`, 9091 :class:`SelectionPredicate`, string) 9092 """ 9093 _schema = {'$ref': '#/definitions/Predicate'} 9094 9095 def __init__(self, *args, **kwds): 9096 super(Predicate, self).__init__(*args, **kwds) 9097 9098 9099class FieldEqualPredicate(Predicate): 9100 """FieldEqualPredicate schema wrapper 9101 9102 Mapping(required=[equal, field]) 9103 9104 Attributes 9105 ---------- 9106 9107 equal : anyOf(string, float, boolean, :class:`DateTime`) 9108 The value that the field should be equal to. 9109 field : :class:`FieldName` 9110 Field to be filtered. 9111 timeUnit : :class:`TimeUnit` 9112 Time unit for the field to be filtered. 9113 """ 9114 _schema = {'$ref': '#/definitions/FieldEqualPredicate'} 9115 9116 def __init__(self, equal=Undefined, field=Undefined, timeUnit=Undefined, **kwds): 9117 super(FieldEqualPredicate, self).__init__(equal=equal, field=field, timeUnit=timeUnit, **kwds) 9118 9119 9120class FieldGTEPredicate(Predicate): 9121 """FieldGTEPredicate schema wrapper 9122 9123 Mapping(required=[field, gte]) 9124 9125 Attributes 9126 ---------- 9127 9128 field : :class:`FieldName` 9129 Field to be filtered. 9130 gte : anyOf(string, float, :class:`DateTime`) 9131 The value that the field should be greater than or equals to. 9132 timeUnit : :class:`TimeUnit` 9133 Time unit for the field to be filtered. 9134 """ 9135 _schema = {'$ref': '#/definitions/FieldGTEPredicate'} 9136 9137 def __init__(self, field=Undefined, gte=Undefined, timeUnit=Undefined, **kwds): 9138 super(FieldGTEPredicate, self).__init__(field=field, gte=gte, timeUnit=timeUnit, **kwds) 9139 9140 9141class FieldGTPredicate(Predicate): 9142 """FieldGTPredicate schema wrapper 9143 9144 Mapping(required=[field, gt]) 9145 9146 Attributes 9147 ---------- 9148 9149 field : :class:`FieldName` 9150 Field to be filtered. 9151 gt : anyOf(string, float, :class:`DateTime`) 9152 The value that the field should be greater than. 9153 timeUnit : :class:`TimeUnit` 9154 Time unit for the field to be filtered. 9155 """ 9156 _schema = {'$ref': '#/definitions/FieldGTPredicate'} 9157 9158 def __init__(self, field=Undefined, gt=Undefined, timeUnit=Undefined, **kwds): 9159 super(FieldGTPredicate, self).__init__(field=field, gt=gt, timeUnit=timeUnit, **kwds) 9160 9161 9162class FieldLTEPredicate(Predicate): 9163 """FieldLTEPredicate schema wrapper 9164 9165 Mapping(required=[field, lte]) 9166 9167 Attributes 9168 ---------- 9169 9170 field : :class:`FieldName` 9171 Field to be filtered. 9172 lte : anyOf(string, float, :class:`DateTime`) 9173 The value that the field should be less than or equals to. 9174 timeUnit : :class:`TimeUnit` 9175 Time unit for the field to be filtered. 9176 """ 9177 _schema = {'$ref': '#/definitions/FieldLTEPredicate'} 9178 9179 def __init__(self, field=Undefined, lte=Undefined, timeUnit=Undefined, **kwds): 9180 super(FieldLTEPredicate, self).__init__(field=field, lte=lte, timeUnit=timeUnit, **kwds) 9181 9182 9183class FieldLTPredicate(Predicate): 9184 """FieldLTPredicate schema wrapper 9185 9186 Mapping(required=[field, lt]) 9187 9188 Attributes 9189 ---------- 9190 9191 field : :class:`FieldName` 9192 Field to be filtered. 9193 lt : anyOf(string, float, :class:`DateTime`) 9194 The value that the field should be less than. 9195 timeUnit : :class:`TimeUnit` 9196 Time unit for the field to be filtered. 9197 """ 9198 _schema = {'$ref': '#/definitions/FieldLTPredicate'} 9199 9200 def __init__(self, field=Undefined, lt=Undefined, timeUnit=Undefined, **kwds): 9201 super(FieldLTPredicate, self).__init__(field=field, lt=lt, timeUnit=timeUnit, **kwds) 9202 9203 9204class FieldOneOfPredicate(Predicate): 9205 """FieldOneOfPredicate schema wrapper 9206 9207 Mapping(required=[field, oneOf]) 9208 9209 Attributes 9210 ---------- 9211 9212 field : :class:`FieldName` 9213 Field to be filtered. 9214 oneOf : anyOf(List(string), List(float), List(boolean), List(:class:`DateTime`)) 9215 A set of values that the ``field`` 's value should be a member of, 9216 for a data item included in the filtered data. 9217 timeUnit : :class:`TimeUnit` 9218 Time unit for the field to be filtered. 9219 """ 9220 _schema = {'$ref': '#/definitions/FieldOneOfPredicate'} 9221 9222 def __init__(self, field=Undefined, oneOf=Undefined, timeUnit=Undefined, **kwds): 9223 super(FieldOneOfPredicate, self).__init__(field=field, oneOf=oneOf, timeUnit=timeUnit, **kwds) 9224 9225 9226class FieldRangePredicate(Predicate): 9227 """FieldRangePredicate schema wrapper 9228 9229 Mapping(required=[field, range]) 9230 9231 Attributes 9232 ---------- 9233 9234 field : :class:`FieldName` 9235 Field to be filtered. 9236 range : List(anyOf(float, :class:`DateTime`, None)) 9237 An array of inclusive minimum and maximum values 9238 for a field value of a data item to be included in the filtered data. 9239 timeUnit : :class:`TimeUnit` 9240 Time unit for the field to be filtered. 9241 """ 9242 _schema = {'$ref': '#/definitions/FieldRangePredicate'} 9243 9244 def __init__(self, field=Undefined, range=Undefined, timeUnit=Undefined, **kwds): 9245 super(FieldRangePredicate, self).__init__(field=field, range=range, timeUnit=timeUnit, **kwds) 9246 9247 9248class FieldValidPredicate(Predicate): 9249 """FieldValidPredicate schema wrapper 9250 9251 Mapping(required=[field, valid]) 9252 9253 Attributes 9254 ---------- 9255 9256 field : :class:`FieldName` 9257 Field to be filtered. 9258 valid : boolean 9259 If set to true the field's value has to be valid, meaning both not ``null`` and not 9260 `NaN 9261 <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN>`__. 9262 timeUnit : :class:`TimeUnit` 9263 Time unit for the field to be filtered. 9264 """ 9265 _schema = {'$ref': '#/definitions/FieldValidPredicate'} 9266 9267 def __init__(self, field=Undefined, valid=Undefined, timeUnit=Undefined, **kwds): 9268 super(FieldValidPredicate, self).__init__(field=field, valid=valid, timeUnit=timeUnit, **kwds) 9269 9270 9271class Projection(VegaLiteSchema): 9272 """Projection schema wrapper 9273 9274 Mapping(required=[]) 9275 9276 Attributes 9277 ---------- 9278 9279 center : List(float) 9280 Sets the projection’s center to the specified center, a two-element array of 9281 longitude and latitude in degrees. 9282 9283 **Default value:** ``[0, 0]`` 9284 clipAngle : float 9285 Sets the projection’s clipping circle radius to the specified angle in degrees. If 9286 ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting 9287 rather than small-circle clipping. 9288 clipExtent : List(List(float)) 9289 Sets the projection’s viewport clip extent to the specified bounds in pixels. The 9290 extent bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is 9291 the left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is 9292 the bottom. If ``null``, no viewport clipping is performed. 9293 coefficient : float 9294 9295 distance : float 9296 9297 fraction : float 9298 9299 lobes : float 9300 9301 parallel : float 9302 9303 precision : float 9304 Sets the threshold for the projection’s `adaptive resampling 9305 <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This 9306 value corresponds to the `Douglas–Peucker distance 9307 <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__. 9308 If precision is not specified, returns the projection’s current resampling precision 9309 which defaults to ``√0.5 ≅ 0.70710…``. 9310 radius : float 9311 9312 ratio : float 9313 9314 reflectX : boolean 9315 9316 reflectY : boolean 9317 9318 rotate : List(float) 9319 Sets the projection’s three-axis rotation to the specified angles, which must be a 9320 two- or three-element array of numbers [ ``lambda``, ``phi``, ``gamma`` ] specifying 9321 the rotation angles in degrees about each spherical axis. (These correspond to yaw, 9322 pitch and roll.) 9323 9324 **Default value:** ``[0, 0, 0]`` 9325 scale : float 9326 Sets the projection's scale (zoom) value, overriding automatic fitting. 9327 spacing : float 9328 9329 tilt : float 9330 9331 translate : List(float) 9332 Sets the projection's translation (pan) value, overriding automatic fitting. 9333 type : :class:`ProjectionType` 9334 The cartographic projection to use. This value is case-insensitive, for example 9335 ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all 9336 valid projection types `in the documentation 9337 <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__. 9338 9339 **Default value:** ``mercator`` 9340 """ 9341 _schema = {'$ref': '#/definitions/Projection'} 9342 9343 def __init__(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined, 9344 coefficient=Undefined, distance=Undefined, fraction=Undefined, lobes=Undefined, 9345 parallel=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined, 9346 reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined, 9347 spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined, **kwds): 9348 super(Projection, self).__init__(center=center, clipAngle=clipAngle, clipExtent=clipExtent, 9349 coefficient=coefficient, distance=distance, fraction=fraction, 9350 lobes=lobes, parallel=parallel, precision=precision, 9351 radius=radius, ratio=ratio, reflectX=reflectX, 9352 reflectY=reflectY, rotate=rotate, scale=scale, spacing=spacing, 9353 tilt=tilt, translate=translate, type=type, **kwds) 9354 9355 9356class ProjectionConfig(VegaLiteSchema): 9357 """ProjectionConfig schema wrapper 9358 9359 Mapping(required=[]) 9360 9361 Attributes 9362 ---------- 9363 9364 center : List(float) 9365 Sets the projection’s center to the specified center, a two-element array of 9366 longitude and latitude in degrees. 9367 9368 **Default value:** ``[0, 0]`` 9369 clipAngle : float 9370 Sets the projection’s clipping circle radius to the specified angle in degrees. If 9371 ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting 9372 rather than small-circle clipping. 9373 clipExtent : List(List(float)) 9374 Sets the projection’s viewport clip extent to the specified bounds in pixels. The 9375 extent bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is 9376 the left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is 9377 the bottom. If ``null``, no viewport clipping is performed. 9378 coefficient : float 9379 9380 distance : float 9381 9382 fraction : float 9383 9384 lobes : float 9385 9386 parallel : float 9387 9388 precision : float 9389 Sets the threshold for the projection’s `adaptive resampling 9390 <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This 9391 value corresponds to the `Douglas–Peucker distance 9392 <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__. 9393 If precision is not specified, returns the projection’s current resampling precision 9394 which defaults to ``√0.5 ≅ 0.70710…``. 9395 radius : float 9396 9397 ratio : float 9398 9399 reflectX : boolean 9400 9401 reflectY : boolean 9402 9403 rotate : List(float) 9404 Sets the projection’s three-axis rotation to the specified angles, which must be a 9405 two- or three-element array of numbers [ ``lambda``, ``phi``, ``gamma`` ] specifying 9406 the rotation angles in degrees about each spherical axis. (These correspond to yaw, 9407 pitch and roll.) 9408 9409 **Default value:** ``[0, 0, 0]`` 9410 scale : float 9411 Sets the projection's scale (zoom) value, overriding automatic fitting. 9412 spacing : float 9413 9414 tilt : float 9415 9416 translate : List(float) 9417 Sets the projection's translation (pan) value, overriding automatic fitting. 9418 type : :class:`ProjectionType` 9419 The cartographic projection to use. This value is case-insensitive, for example 9420 ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all 9421 valid projection types `in the documentation 9422 <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__. 9423 9424 **Default value:** ``mercator`` 9425 """ 9426 _schema = {'$ref': '#/definitions/ProjectionConfig'} 9427 9428 def __init__(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined, 9429 coefficient=Undefined, distance=Undefined, fraction=Undefined, lobes=Undefined, 9430 parallel=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined, 9431 reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined, 9432 spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined, **kwds): 9433 super(ProjectionConfig, self).__init__(center=center, clipAngle=clipAngle, 9434 clipExtent=clipExtent, coefficient=coefficient, 9435 distance=distance, fraction=fraction, lobes=lobes, 9436 parallel=parallel, precision=precision, radius=radius, 9437 ratio=ratio, reflectX=reflectX, reflectY=reflectY, 9438 rotate=rotate, scale=scale, spacing=spacing, tilt=tilt, 9439 translate=translate, type=type, **kwds) 9440 9441 9442class ProjectionType(VegaLiteSchema): 9443 """ProjectionType schema wrapper 9444 9445 enum('albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 9446 'conicEqualArea', 'conicEquidistant', 'equirectangular', 'gnomonic', 'identity', 'mercator', 9447 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator') 9448 """ 9449 _schema = {'$ref': '#/definitions/ProjectionType'} 9450 9451 def __init__(self, *args): 9452 super(ProjectionType, self).__init__(*args) 9453 9454 9455class RangeConfig(VegaLiteSchema): 9456 """RangeConfig schema wrapper 9457 9458 Mapping(required=[]) 9459 9460 Attributes 9461 ---------- 9462 9463 category : anyOf(List(string), :class:`SchemeConfig`) 9464 Default range for *nominal* (categorical) fields. 9465 diverging : anyOf(List(string), :class:`SchemeConfig`) 9466 Default range for diverging *quantitative* fields. 9467 heatmap : anyOf(List(string), :class:`SchemeConfig`) 9468 Default range for *quantitative* heatmaps. 9469 ordinal : anyOf(List(string), :class:`SchemeConfig`) 9470 Default range for *ordinal* fields. 9471 ramp : anyOf(List(string), :class:`SchemeConfig`) 9472 Default range for *quantitative* and *temporal* fields. 9473 symbol : List(string) 9474 Default range palette for the ``shape`` channel. 9475 """ 9476 _schema = {'$ref': '#/definitions/RangeConfig'} 9477 9478 def __init__(self, category=Undefined, diverging=Undefined, heatmap=Undefined, ordinal=Undefined, 9479 ramp=Undefined, symbol=Undefined, **kwds): 9480 super(RangeConfig, self).__init__(category=category, diverging=diverging, heatmap=heatmap, 9481 ordinal=ordinal, ramp=ramp, symbol=symbol, **kwds) 9482 9483 9484class RangeConfigValue(VegaLiteSchema): 9485 """RangeConfigValue schema wrapper 9486 9487 anyOf(List(anyOf(float, string)), :class:`SchemeConfig`, Mapping(required=[step])) 9488 """ 9489 _schema = {'$ref': '#/definitions/RangeConfigValue'} 9490 9491 def __init__(self, *args, **kwds): 9492 super(RangeConfigValue, self).__init__(*args, **kwds) 9493 9494 9495class RectConfig(VegaLiteSchema): 9496 """RectConfig schema wrapper 9497 9498 Mapping(required=[]) 9499 9500 Attributes 9501 ---------- 9502 9503 align : :class:`Align` 9504 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 9505 angle : float 9506 The rotation angle of the text, in degrees. 9507 baseline : :class:`TextBaseline` 9508 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 9509 9510 **Default value:** ``"middle"`` 9511 binSpacing : float 9512 Offset between bars for binned field. Ideal value for this is either 0 (Preferred 9513 by statisticians) or 1 (Vega-Lite Default, D3 example style). 9514 9515 **Default value:** ``1`` 9516 color : :class:`Color` 9517 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 9518 ``color`` and will override ``color``. 9519 9520 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 9521 ``"#4682b4"`` 9522 9523 **Note:** This property cannot be used in a `style config 9524 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 9525 continuousBandSize : float 9526 The default size of the bars on continuous scales. 9527 9528 **Default value:** ``5`` 9529 cornerRadius : float 9530 The radius in pixels of rounded rectangle corners. 9531 9532 **Default value:** ``0`` 9533 cursor : :class:`Cursor` 9534 The mouse cursor used over the mark. Any valid `CSS cursor type 9535 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 9536 dir : :class:`Dir` 9537 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 9538 (right-to-left). This property determines on which side is truncated in response to 9539 the limit parameter. 9540 9541 **Default value:** ``"ltr"`` 9542 discreteBandSize : float 9543 The default size of the bars with discrete dimensions. If unspecified, the default 9544 size is ``bandSize-1``, 9545 which provides 1 pixel offset between bars. 9546 dx : float 9547 The horizontal offset, in pixels, between the text label and its anchor point. The 9548 offset is applied after rotation by the *angle* property. 9549 dy : float 9550 The vertical offset, in pixels, between the text label and its anchor point. The 9551 offset is applied after rotation by the *angle* property. 9552 ellipsis : string 9553 The ellipsis string for text truncated in response to the limit parameter. 9554 9555 **Default value:** ``"…"`` 9556 fill : :class:`Color` 9557 Default Fill Color. This has higher precedence than ``config.color`` 9558 9559 **Default value:** (None) 9560 fillOpacity : float 9561 The fill opacity (value between [0,1]). 9562 9563 **Default value:** ``1`` 9564 filled : boolean 9565 Whether the mark's color should be used as fill color instead of stroke color. 9566 9567 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 9568 ``true``. 9569 9570 **Note:** This property cannot be used in a `style config 9571 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 9572 font : string 9573 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 9574 fontSize : float 9575 The font size, in pixels. 9576 fontStyle : :class:`FontStyle` 9577 The font style (e.g., ``"italic"`` ). 9578 fontWeight : :class:`FontWeight` 9579 The font weight. 9580 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 9581 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 9582 ). 9583 height : float 9584 Height of the marks. 9585 href : string 9586 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 9587 interpolate : :class:`Interpolate` 9588 The line interpolation method to use for line and area marks. One of the following: 9589 9590 9591 * ``"linear"`` : piecewise linear segments, as in a polyline. 9592 * ``"linear-closed"`` : close the linear segments to form a polygon. 9593 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 9594 function. 9595 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 9596 step function. 9597 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 9598 step function. 9599 * ``"basis"`` : a B-spline, with control point duplication on the ends. 9600 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 9601 * ``"basis-closed"`` : a closed B-spline, as in a loop. 9602 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 9603 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 9604 but will intersect other control points. 9605 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 9606 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 9607 straighten the spline. 9608 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 9609 limit : float 9610 The maximum length of the text mark in pixels. The text value will be automatically 9611 truncated if the rendered size exceeds the limit. 9612 9613 **Default value:** ``0``, indicating no limit 9614 opacity : float 9615 The overall opacity (value between [0,1]). 9616 9617 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 9618 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 9619 order : anyOf(None, boolean) 9620 For line and trail marks, this ``order`` property can be set to ``null`` or 9621 ``false`` to make the lines use the original order in the data sources. 9622 orient : :class:`Orientation` 9623 The orientation of a non-stacked bar, tick, area, and line charts. 9624 The value is either horizontal (default) or vertical. 9625 9626 9627 * For bar, rule and tick, this determines whether the size of the bar and tick 9628 should be applied to x or y dimension. 9629 * For area, this property determines the orient property of the Vega output. 9630 * For line and trail marks, this property determines the sort order of the points in 9631 the line 9632 if ``config.sortLineBy`` is not specified. 9633 For stacked charts, this is always determined by the orientation of the stack; 9634 therefore explicitly specified value will be ignored. 9635 radius : float 9636 Polar coordinate radial offset, in pixels, of the text label from the origin 9637 determined by the ``x`` and ``y`` properties. 9638 shape : string 9639 Shape of the point marks. Supported values include: 9640 9641 9642 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 9643 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 9644 ``"triangle-left"``. 9645 * the line symbol ``"stroke"`` 9646 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 9647 * a custom `SVG path string 9648 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 9649 sizing, custom shape paths should be defined within a square bounding box with 9650 coordinates ranging from -1 to 1 along both the x and y dimensions.) 9651 9652 **Default value:** ``"circle"`` 9653 size : float 9654 Default size for marks. 9655 9656 9657 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 9658 marks. For example: in the case of circles, the radius is determined in part by 9659 the square root of the size value. 9660 * For ``bar``, this represents the band size of the bar, in pixels. 9661 * For ``text``, this represents the font size, in pixels. 9662 9663 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 9664 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 9665 ``11`` for text marks. 9666 stroke : :class:`Color` 9667 Default Stroke Color. This has higher precedence than ``config.color`` 9668 9669 **Default value:** (None) 9670 strokeCap : :class:`StrokeCap` 9671 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 9672 ``"square"``. 9673 9674 **Default value:** ``"square"`` 9675 strokeDash : List(float) 9676 An array of alternating stroke, space lengths for creating dashed or dotted lines. 9677 strokeDashOffset : float 9678 The offset (in pixels) into which to begin drawing with the stroke dash array. 9679 strokeJoin : :class:`StrokeJoin` 9680 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 9681 9682 **Default value:** ``"miter"`` 9683 strokeMiterLimit : float 9684 The miter limit at which to bevel a line join. 9685 strokeOpacity : float 9686 The stroke opacity (value between [0,1]). 9687 9688 **Default value:** ``1`` 9689 strokeWidth : float 9690 The stroke width, in pixels. 9691 tension : float 9692 Depending on the interpolation type, sets the tension parameter (for line and area 9693 marks). 9694 text : string 9695 Placeholder text if the ``text`` channel is not specified 9696 theta : float 9697 Polar coordinate angle, in radians, of the text label from the origin determined by 9698 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 9699 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 9700 radians, with ``0`` indicating "north". 9701 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 9702 The tooltip text string to show upon mouse hover or an object defining which fields 9703 should the tooltip be derived from. 9704 9705 9706 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 9707 will be used. 9708 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 9709 highlighted data point will be used. 9710 * If set to ``null``, then no tooltip will be used. 9711 width : float 9712 Width of the marks. 9713 x : anyOf(float, enum('width')) 9714 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 9715 specified ``x2`` or ``width``. 9716 9717 The ``value`` of this channel can be a number or a string ``"width"`` for the width 9718 of the plot. 9719 x2 : anyOf(float, enum('width')) 9720 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 9721 9722 The ``value`` of this channel can be a number or a string ``"width"`` for the width 9723 of the plot. 9724 y : anyOf(float, enum('height')) 9725 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 9726 specified ``y2`` or ``height``. 9727 9728 The ``value`` of this channel can be a number or a string ``"height"`` for the 9729 height of the plot. 9730 y2 : anyOf(float, enum('width')) 9731 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 9732 9733 The ``value`` of this channel can be a number or a string ``"height"`` for the 9734 height of the plot. 9735 """ 9736 _schema = {'$ref': '#/definitions/RectConfig'} 9737 9738 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined, 9739 color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined, 9740 cursor=Undefined, dir=Undefined, discreteBandSize=Undefined, dx=Undefined, 9741 dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, 9742 filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, 9743 fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, 9744 limit=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, 9745 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 9746 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 9747 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 9748 strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, 9749 tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, 9750 y2=Undefined, **kwds): 9751 super(RectConfig, self).__init__(align=align, angle=angle, baseline=baseline, 9752 binSpacing=binSpacing, color=color, 9753 continuousBandSize=continuousBandSize, 9754 cornerRadius=cornerRadius, cursor=cursor, dir=dir, 9755 discreteBandSize=discreteBandSize, dx=dx, dy=dy, 9756 ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, 9757 filled=filled, font=font, fontSize=fontSize, 9758 fontStyle=fontStyle, fontWeight=fontWeight, height=height, 9759 href=href, interpolate=interpolate, limit=limit, 9760 opacity=opacity, order=order, orient=orient, radius=radius, 9761 shape=shape, size=size, stroke=stroke, strokeCap=strokeCap, 9762 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 9763 strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit, 9764 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 9765 tension=tension, text=text, theta=theta, tooltip=tooltip, 9766 width=width, x=x, x2=x2, y=y, y2=y2, **kwds) 9767 9768 9769class RepeatMapping(VegaLiteSchema): 9770 """RepeatMapping schema wrapper 9771 9772 Mapping(required=[]) 9773 9774 Attributes 9775 ---------- 9776 9777 column : List(string) 9778 An array of fields to be repeated horizontally. 9779 row : List(string) 9780 An array of fields to be repeated vertically. 9781 """ 9782 _schema = {'$ref': '#/definitions/RepeatMapping'} 9783 9784 def __init__(self, column=Undefined, row=Undefined, **kwds): 9785 super(RepeatMapping, self).__init__(column=column, row=row, **kwds) 9786 9787 9788class RepeatRef(Field): 9789 """RepeatRef schema wrapper 9790 9791 Mapping(required=[repeat]) 9792 A ValueDef with optional Condition<ValueDef | FieldDef> 9793 Reference to a repeated value. 9794 9795 Attributes 9796 ---------- 9797 9798 repeat : enum('row', 'column', 'repeat') 9799 9800 """ 9801 _schema = {'$ref': '#/definitions/RepeatRef'} 9802 9803 def __init__(self, repeat=Undefined, **kwds): 9804 super(RepeatRef, self).__init__(repeat=repeat, **kwds) 9805 9806 9807class Resolve(VegaLiteSchema): 9808 """Resolve schema wrapper 9809 9810 Mapping(required=[]) 9811 Defines how scales, axes, and legends from different specs should be combined. Resolve is a 9812 mapping from ``scale``, ``axis``, and ``legend`` to a mapping from channels to resolutions. 9813 9814 Attributes 9815 ---------- 9816 9817 axis : :class:`AxisResolveMap` 9818 9819 legend : :class:`LegendResolveMap` 9820 9821 scale : :class:`ScaleResolveMap` 9822 9823 """ 9824 _schema = {'$ref': '#/definitions/Resolve'} 9825 9826 def __init__(self, axis=Undefined, legend=Undefined, scale=Undefined, **kwds): 9827 super(Resolve, self).__init__(axis=axis, legend=legend, scale=scale, **kwds) 9828 9829 9830class ResolveMode(VegaLiteSchema): 9831 """ResolveMode schema wrapper 9832 9833 enum('independent', 'shared') 9834 """ 9835 _schema = {'$ref': '#/definitions/ResolveMode'} 9836 9837 def __init__(self, *args): 9838 super(ResolveMode, self).__init__(*args) 9839 9840 9841class RowColLayoutAlign(VegaLiteSchema): 9842 """RowColLayoutAlign schema wrapper 9843 9844 Mapping(required=[]) 9845 9846 Attributes 9847 ---------- 9848 9849 column : :class:`LayoutAlign` 9850 9851 row : :class:`LayoutAlign` 9852 9853 """ 9854 _schema = {'$ref': '#/definitions/RowCol<LayoutAlign>'} 9855 9856 def __init__(self, column=Undefined, row=Undefined, **kwds): 9857 super(RowColLayoutAlign, self).__init__(column=column, row=row, **kwds) 9858 9859 9860class RowColboolean(VegaLiteSchema): 9861 """RowColboolean schema wrapper 9862 9863 Mapping(required=[]) 9864 9865 Attributes 9866 ---------- 9867 9868 column : boolean 9869 9870 row : boolean 9871 9872 """ 9873 _schema = {'$ref': '#/definitions/RowCol<boolean>'} 9874 9875 def __init__(self, column=Undefined, row=Undefined, **kwds): 9876 super(RowColboolean, self).__init__(column=column, row=row, **kwds) 9877 9878 9879class RowColnumber(VegaLiteSchema): 9880 """RowColnumber schema wrapper 9881 9882 Mapping(required=[]) 9883 9884 Attributes 9885 ---------- 9886 9887 column : float 9888 9889 row : float 9890 9891 """ 9892 _schema = {'$ref': '#/definitions/RowCol<number>'} 9893 9894 def __init__(self, column=Undefined, row=Undefined, **kwds): 9895 super(RowColnumber, self).__init__(column=column, row=row, **kwds) 9896 9897 9898class Scale(VegaLiteSchema): 9899 """Scale schema wrapper 9900 9901 Mapping(required=[]) 9902 9903 Attributes 9904 ---------- 9905 9906 align : float 9907 The alignment of the steps within the scale range. 9908 9909 This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the 9910 steps should be centered within the range. A value of ``0`` or ``1`` may be used to 9911 shift the bands to one side, say to position them adjacent to an axis. 9912 9913 **Default value:** ``0.5`` 9914 base : float 9915 The logarithm base of the ``log`` scale (default ``10`` ). 9916 bins : List(float) 9917 An array of bin boundaries over the scale domain. If provided, axes and legends will 9918 use the bin boundaries to inform the choice of tick marks and text labels. 9919 clamp : boolean 9920 If ``true``, values that exceed the data domain are clamped to either the minimum or 9921 maximum range value 9922 9923 **Default value:** derived from the `scale config 9924 <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__ 's ``clamp`` ( 9925 ``true`` by default). 9926 constant : float 9927 A constant determining the slope of the symlog function around zero. Only used for 9928 ``symlog`` scales. 9929 9930 **Default value:** ``1`` 9931 domain : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`), 9932 enum('unaggregated'), :class:`SelectionDomain`) 9933 Customized domain values. 9934 9935 For *quantitative* fields, ``domain`` can take the form of a two-element array with 9936 minimum and maximum values. `Piecewise scales 9937 <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__ can be created by 9938 providing a ``domain`` with more than two entries. 9939 If the input field is aggregated, ``domain`` can also be a string value 9940 ``"unaggregated"``, indicating that the domain should include the raw data values 9941 prior to the aggregation. 9942 9943 For *temporal* fields, ``domain`` can be a two-element array minimum and maximum 9944 values, in the form of either timestamps or the `DateTime definition objects 9945 <https://vega.github.io/vega-lite/docs/types.html#datetime>`__. 9946 9947 For *ordinal* and *nominal* fields, ``domain`` can be an array that lists valid 9948 input values. 9949 9950 The ``selection`` property can be used to `interactively determine 9951 <https://vega.github.io/vega-lite/docs/selection.html#scale-domains>`__ the scale 9952 domain. 9953 exponent : float 9954 The exponent of the ``pow`` scale. 9955 interpolate : anyOf(:class:`ScaleInterpolate`, :class:`ScaleInterpolateParams`) 9956 The interpolation method for range values. By default, a general interpolator for 9957 numbers, dates, strings and colors (in HCL space) is used. For color ranges, this 9958 property allows interpolation in alternative color spaces. Legal values include 9959 ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and 9960 ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces). 9961 If object-valued, this property accepts an object with a string-valued *type* 9962 property and an optional numeric *gamma* property applicable to rgb and cubehelix 9963 interpolators. For more, see the `d3-interpolate documentation 9964 <https://github.com/d3/d3-interpolate>`__. 9965 9966 9967 * **Default value:** ``hcl`` 9968 nice : anyOf(boolean, float, :class:`NiceTime`, Mapping(required=[interval, step])) 9969 Extending the domain so that it starts and ends on nice round values. This method 9970 typically modifies the scale’s domain, and may only extend the bounds to the nearest 9971 round value. Nicing is useful if the domain is computed from data and may be 9972 irregular. For example, for a domain of *[0.201479…, 0.996679…]*, a nice domain 9973 might be *[0.2, 1.0]*. 9974 9975 For quantitative scales such as linear, ``nice`` can be either a boolean flag or a 9976 number. If ``nice`` is a number, it will represent a desired tick count. This allows 9977 greater control over the step size used to extend the bounds, guaranteeing that the 9978 returned ticks will exactly cover the domain. 9979 9980 For temporal fields with time and utc scales, the ``nice`` value can be a string 9981 indicating the desired time interval. Legal values are ``"millisecond"``, 9982 ``"second"``, ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and 9983 ``"year"``. Alternatively, ``time`` and ``utc`` scales can accept an object-valued 9984 interval specifier of the form ``{"interval": "month", "step": 3}``, which includes 9985 a desired number of interval steps. Here, the domain would snap to quarter (Jan, 9986 Apr, Jul, Oct) boundaries. 9987 9988 **Default value:** ``true`` for unbinned *quantitative* fields; ``false`` otherwise. 9989 padding : float 9990 For * `continuous <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ * 9991 scales, expands the scale domain to accommodate the specified number of pixels on 9992 each of the scale range. The scale range must represent pixels for this parameter to 9993 function as intended. Padding adjustment is performed prior to all other 9994 adjustments, including the effects of the ``zero``, ``nice``, ``domainMin``, and 9995 ``domainMax`` properties. 9996 9997 For * `band <https://vega.github.io/vega-lite/docs/scale.html#band>`__ * scales, 9998 shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value. 9999 10000 For * `point <https://vega.github.io/vega-lite/docs/scale.html#point>`__ * scales, 10001 alias for ``paddingOuter``. 10002 10003 **Default value:** For *continuous* scales, derived from the `scale config 10004 <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's 10005 ``continuousPadding``. 10006 For *band and point* scales, see ``paddingInner`` and ``paddingOuter``. By default, 10007 Vega-Lite sets padding such that *width/height = number of unique values * step*. 10008 paddingInner : float 10009 The inner padding (spacing) within each band step of band scales, as a fraction of 10010 the step size. This value must lie in the range [0,1]. 10011 10012 For point scale, this property is invalid as point scales do not have internal band 10013 widths (only step sizes between bands). 10014 10015 **Default value:** derived from the `scale config 10016 <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's 10017 ``bandPaddingInner``. 10018 paddingOuter : float 10019 The outer padding (spacing) at the ends of the range of band and point scales, 10020 as a fraction of the step size. This value must lie in the range [0,1]. 10021 10022 **Default value:** derived from the `scale config 10023 <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's ``bandPaddingOuter`` 10024 for band scales and ``pointPadding`` for point scales. 10025 By default, Vega-Lite sets outer padding such that *width/height = number of unique 10026 values * step*. 10027 range : anyOf(List(float), List(string), string) 10028 The range of the scale. One of: 10029 10030 10031 A string indicating a `pre-defined named scale range 10032 <https://vega.github.io/vega-lite/docs/scale.html#range-config>`__ (e.g., example, 10033 ``"symbol"``, or ``"diverging"`` ). 10034 10035 For `continuous scales 10036 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, two-element array 10037 indicating minimum and maximum values, or an array with more than two entries for 10038 specifying a `piecewise scale 10039 <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__. 10040 10041 For `discrete <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ and 10042 `discretizing <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ 10043 scales, an array of desired output values. 10044 10045 **Notes:** 10046 10047 1) For color scales you can also specify a color `scheme 10048 <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ instead of ``range``. 10049 10050 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored. 10051 Range can be customized via the view's corresponding `size 10052 <https://vega.github.io/vega-lite/docs/size.html>`__ ( ``width`` and ``height`` ) or 10053 via `range steps and paddings properties <#range-step>`__ for `band <#band>`__ and 10054 `point <#point>`__ scales. 10055 rangeStep : anyOf(float, None) 10056 The distance between the starts of adjacent bands or points in `band 10057 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `point 10058 <https://vega.github.io/vega-lite/docs/scale.html#point>`__ scales. 10059 10060 If ``rangeStep`` is ``null`` or if the view contains the scale's corresponding `size 10061 <https://vega.github.io/vega-lite/docs/size.html>`__ ( ``width`` for ``x`` scales 10062 and ``height`` for ``y`` scales), ``rangeStep`` will be automatically determined to 10063 fit the size of the view. 10064 10065 **Default value:** derived the `scale config 10066 <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__ 's 10067 ``textXRangeStep`` ( ``90`` by default) for x-scales of ``text`` marks and 10068 ``rangeStep`` ( ``21`` by default) for x-scales of other marks and y-scales. 10069 10070 **Warning** : If ``rangeStep`` is ``null`` and the cardinality of the scale's domain 10071 is higher than ``width`` or ``height``, the rangeStep might become less than one 10072 pixel and the mark might not appear correctly. 10073 round : boolean 10074 If ``true``, rounds numeric output values to integers. This can be helpful for 10075 snapping to the pixel grid. 10076 10077 **Default value:** ``false``. 10078 scheme : anyOf(string, :class:`SchemeParams`) 10079 A string indicating a color `scheme 10080 <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ name (e.g., 10081 ``"category10"`` or ``"blues"`` ) or a `scheme parameter object 10082 <https://vega.github.io/vega-lite/docs/scale.html#scheme-params>`__. 10083 10084 Discrete color schemes may be used with `discrete 10085 <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ or `discretizing 10086 <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ scales. 10087 Continuous color schemes are intended for use with color scales. 10088 10089 For the full list of supported schemes, please refer to the `Vega Scheme 10090 <https://vega.github.io/vega/docs/schemes/#reference>`__ reference. 10091 type : :class:`ScaleType` 10092 The type of scale. Vega-Lite supports the following categories of scale types: 10093 10094 1) `Continuous Scales 10095 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ -- mapping 10096 continuous domains to continuous output ranges ( `"linear" 10097 <https://vega.github.io/vega-lite/docs/scale.html#linear>`__, `"pow" 10098 <https://vega.github.io/vega-lite/docs/scale.html#pow>`__, `"sqrt" 10099 <https://vega.github.io/vega-lite/docs/scale.html#sqrt>`__, `"symlog" 10100 <https://vega.github.io/vega-lite/docs/scale.html#symlog>`__, `"log" 10101 <https://vega.github.io/vega-lite/docs/scale.html#log>`__, `"time" 10102 <https://vega.github.io/vega-lite/docs/scale.html#time>`__, `"utc" 10103 <https://vega.github.io/vega-lite/docs/scale.html#utc>`__. 10104 10105 2) `Discrete Scales <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ 10106 -- mapping discrete domains to discrete ( `"ordinal" 10107 <https://vega.github.io/vega-lite/docs/scale.html#ordinal>`__ ) or continuous ( 10108 `"band" <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `"point" 10109 <https://vega.github.io/vega-lite/docs/scale.html#point>`__ ) output ranges. 10110 10111 3) `Discretizing Scales 10112 <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ -- mapping 10113 continuous domains to discrete output ranges `"bin-ordinal" 10114 <https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal>`__, `"quantile" 10115 <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__, `"quantize" 10116 <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ and `"threshold" 10117 <https://vega.github.io/vega-lite/docs/scale.html#threshold>`__. 10118 10119 **Default value:** please see the `scale type table 10120 <https://vega.github.io/vega-lite/docs/scale.html#type>`__. 10121 zero : boolean 10122 If ``true``, ensures that a zero baseline value is included in the scale domain. 10123 10124 **Default value:** ``true`` for x and y channels if the quantitative field is not 10125 binned and no custom ``domain`` is provided; ``false`` otherwise. 10126 10127 **Note:** Log, time, and utc scales do not support ``zero``. 10128 """ 10129 _schema = {'$ref': '#/definitions/Scale'} 10130 10131 def __init__(self, align=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, 10132 constant=Undefined, domain=Undefined, exponent=Undefined, interpolate=Undefined, 10133 nice=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, 10134 range=Undefined, rangeStep=Undefined, round=Undefined, scheme=Undefined, 10135 type=Undefined, zero=Undefined, **kwds): 10136 super(Scale, self).__init__(align=align, base=base, bins=bins, clamp=clamp, constant=constant, 10137 domain=domain, exponent=exponent, interpolate=interpolate, 10138 nice=nice, padding=padding, paddingInner=paddingInner, 10139 paddingOuter=paddingOuter, range=range, rangeStep=rangeStep, 10140 round=round, scheme=scheme, type=type, zero=zero, **kwds) 10141 10142 10143class ScaleConfig(VegaLiteSchema): 10144 """ScaleConfig schema wrapper 10145 10146 Mapping(required=[]) 10147 10148 Attributes 10149 ---------- 10150 10151 bandPaddingInner : float 10152 Default inner padding for ``x`` and ``y`` band-ordinal scales. 10153 10154 **Default value:** 10155 10156 10157 * ``barBandPaddingInner`` for bar marks ( ``0.1`` by default) 10158 * ``rectBandPaddingInner`` for rect and other marks ( ``0`` by default) 10159 bandPaddingOuter : float 10160 Default outer padding for ``x`` and ``y`` band-ordinal scales. 10161 10162 **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique 10163 values * step* ) 10164 barBandPaddingInner : float 10165 Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks. 10166 10167 **Default value:** ``0.1`` 10168 barBandPaddingOuter : float 10169 Default outer padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks. 10170 If not specified, by default, band scale's paddingOuter is paddingInner/2. 10171 clamp : boolean 10172 If true, values that exceed the data domain are clamped to either the minimum or 10173 maximum range value 10174 continuousPadding : float 10175 Default padding for continuous scales. 10176 10177 **Default:** ``5`` for continuous x-scale of a vertical bar and continuous y-scale 10178 of a horizontal bar.; ``0`` otherwise. 10179 maxBandSize : float 10180 The default max value for mapping quantitative fields to bar's size/bandSize. 10181 10182 If undefined (default), we will use the scale's ``rangeStep`` - 1. 10183 maxFontSize : float 10184 The default max value for mapping quantitative fields to text's size/fontSize. 10185 10186 **Default value:** ``40`` 10187 maxOpacity : float 10188 Default max opacity for mapping a field to opacity. 10189 10190 **Default value:** ``0.8`` 10191 maxSize : float 10192 Default max value for point size scale. 10193 maxStrokeWidth : float 10194 Default max strokeWidth for the scale of strokeWidth for rule and line marks and of 10195 size for trail marks. 10196 10197 **Default value:** ``4`` 10198 minBandSize : float 10199 The default min value for mapping quantitative fields to bar and tick's 10200 size/bandSize scale with zero=false. 10201 10202 **Default value:** ``2`` 10203 minFontSize : float 10204 The default min value for mapping quantitative fields to tick's size/fontSize scale 10205 with zero=false 10206 10207 **Default value:** ``8`` 10208 minOpacity : float 10209 Default minimum opacity for mapping a field to opacity. 10210 10211 **Default value:** ``0.3`` 10212 minSize : float 10213 Default minimum value for point size scale with zero=false. 10214 10215 **Default value:** ``9`` 10216 minStrokeWidth : float 10217 Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and 10218 of size for trail marks with zero=false. 10219 10220 **Default value:** ``1`` 10221 pointPadding : float 10222 Default outer padding for ``x`` and ``y`` point-ordinal scales. 10223 10224 **Default value:** ``0.5`` (which makes *width/height = number of unique values * 10225 step* ) 10226 quantileCount : float 10227 Default range cardinality for `quantile 10228 <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__ scale. 10229 10230 **Default value:** ``4`` 10231 quantizeCount : float 10232 Default range cardinality for `quantize 10233 <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ scale. 10234 10235 **Default value:** ``4`` 10236 rangeStep : anyOf(float, None) 10237 Default range step for band and point scales of (1) the ``y`` channel 10238 and (2) the ``x`` channel when the mark is not ``text``. 10239 10240 **Default value:** ``20`` 10241 rectBandPaddingInner : float 10242 Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks. 10243 10244 **Default value:** ``0`` 10245 rectBandPaddingOuter : float 10246 Default outer padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks. 10247 If not specified, by default, band scale's paddingOuter is paddingInner/2. 10248 round : boolean 10249 If true, rounds numeric output values to integers. 10250 This can be helpful for snapping to the pixel grid. 10251 (Only available for ``x``, ``y``, and ``size`` scales.) 10252 textXRangeStep : float 10253 Default range step for ``x`` band and point scales of text marks. 10254 10255 **Default value:** ``90`` 10256 useUnaggregatedDomain : boolean 10257 Use the source data range before aggregation as scale domain instead of aggregated 10258 data for aggregate axis. 10259 10260 This is equivalent to setting ``domain`` to ``"unaggregate"`` for aggregated 10261 *quantitative* fields by default. 10262 10263 This property only works with aggregate functions that produce values within the raw 10264 data domain ( ``"mean"``, ``"average"``, ``"median"``, ``"q1"``, ``"q3"``, 10265 ``"min"``, ``"max"`` ). For other aggregations that produce values outside of the 10266 raw data domain (e.g. ``"count"``, ``"sum"`` ), this property is ignored. 10267 10268 **Default value:** ``false`` 10269 """ 10270 _schema = {'$ref': '#/definitions/ScaleConfig'} 10271 10272 def __init__(self, bandPaddingInner=Undefined, bandPaddingOuter=Undefined, 10273 barBandPaddingInner=Undefined, barBandPaddingOuter=Undefined, clamp=Undefined, 10274 continuousPadding=Undefined, maxBandSize=Undefined, maxFontSize=Undefined, 10275 maxOpacity=Undefined, maxSize=Undefined, maxStrokeWidth=Undefined, 10276 minBandSize=Undefined, minFontSize=Undefined, minOpacity=Undefined, minSize=Undefined, 10277 minStrokeWidth=Undefined, pointPadding=Undefined, quantileCount=Undefined, 10278 quantizeCount=Undefined, rangeStep=Undefined, rectBandPaddingInner=Undefined, 10279 rectBandPaddingOuter=Undefined, round=Undefined, textXRangeStep=Undefined, 10280 useUnaggregatedDomain=Undefined, **kwds): 10281 super(ScaleConfig, self).__init__(bandPaddingInner=bandPaddingInner, 10282 bandPaddingOuter=bandPaddingOuter, 10283 barBandPaddingInner=barBandPaddingInner, 10284 barBandPaddingOuter=barBandPaddingOuter, clamp=clamp, 10285 continuousPadding=continuousPadding, maxBandSize=maxBandSize, 10286 maxFontSize=maxFontSize, maxOpacity=maxOpacity, 10287 maxSize=maxSize, maxStrokeWidth=maxStrokeWidth, 10288 minBandSize=minBandSize, minFontSize=minFontSize, 10289 minOpacity=minOpacity, minSize=minSize, 10290 minStrokeWidth=minStrokeWidth, pointPadding=pointPadding, 10291 quantileCount=quantileCount, quantizeCount=quantizeCount, 10292 rangeStep=rangeStep, 10293 rectBandPaddingInner=rectBandPaddingInner, 10294 rectBandPaddingOuter=rectBandPaddingOuter, round=round, 10295 textXRangeStep=textXRangeStep, 10296 useUnaggregatedDomain=useUnaggregatedDomain, **kwds) 10297 10298 10299class ScaleInterpolate(VegaLiteSchema): 10300 """ScaleInterpolate schema wrapper 10301 10302 enum('rgb', 'lab', 'hcl', 'hsl', 'hsl-long', 'hcl-long', 'cubehelix', 'cubehelix-long') 10303 """ 10304 _schema = {'$ref': '#/definitions/ScaleInterpolate'} 10305 10306 def __init__(self, *args): 10307 super(ScaleInterpolate, self).__init__(*args) 10308 10309 10310class ScaleInterpolateParams(VegaLiteSchema): 10311 """ScaleInterpolateParams schema wrapper 10312 10313 Mapping(required=[type]) 10314 10315 Attributes 10316 ---------- 10317 10318 type : enum('rgb', 'cubehelix', 'cubehelix-long') 10319 10320 gamma : float 10321 10322 """ 10323 _schema = {'$ref': '#/definitions/ScaleInterpolateParams'} 10324 10325 def __init__(self, type=Undefined, gamma=Undefined, **kwds): 10326 super(ScaleInterpolateParams, self).__init__(type=type, gamma=gamma, **kwds) 10327 10328 10329class ScaleResolveMap(VegaLiteSchema): 10330 """ScaleResolveMap schema wrapper 10331 10332 Mapping(required=[]) 10333 10334 Attributes 10335 ---------- 10336 10337 color : :class:`ResolveMode` 10338 10339 fill : :class:`ResolveMode` 10340 10341 fillOpacity : :class:`ResolveMode` 10342 10343 opacity : :class:`ResolveMode` 10344 10345 shape : :class:`ResolveMode` 10346 10347 size : :class:`ResolveMode` 10348 10349 stroke : :class:`ResolveMode` 10350 10351 strokeOpacity : :class:`ResolveMode` 10352 10353 strokeWidth : :class:`ResolveMode` 10354 10355 x : :class:`ResolveMode` 10356 10357 y : :class:`ResolveMode` 10358 10359 """ 10360 _schema = {'$ref': '#/definitions/ScaleResolveMap'} 10361 10362 def __init__(self, color=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, 10363 shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined, 10364 strokeWidth=Undefined, x=Undefined, y=Undefined, **kwds): 10365 super(ScaleResolveMap, self).__init__(color=color, fill=fill, fillOpacity=fillOpacity, 10366 opacity=opacity, shape=shape, size=size, stroke=stroke, 10367 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, x=x, 10368 y=y, **kwds) 10369 10370 10371class ScaleType(VegaLiteSchema): 10372 """ScaleType schema wrapper 10373 10374 enum('linear', 'log', 'pow', 'sqrt', 'symlog', 'time', 'utc', 'quantile', 'quantize', 10375 'threshold', 'bin-ordinal', 'ordinal', 'point', 'band') 10376 """ 10377 _schema = {'$ref': '#/definitions/ScaleType'} 10378 10379 def __init__(self, *args): 10380 super(ScaleType, self).__init__(*args) 10381 10382 10383class SchemeConfig(RangeConfigValue): 10384 """SchemeConfig schema wrapper 10385 10386 Mapping(required=[scheme]) 10387 10388 Attributes 10389 ---------- 10390 10391 scheme : string 10392 10393 count : float 10394 10395 extent : List(float) 10396 10397 """ 10398 _schema = {'$ref': '#/definitions/SchemeConfig'} 10399 10400 def __init__(self, scheme=Undefined, count=Undefined, extent=Undefined, **kwds): 10401 super(SchemeConfig, self).__init__(scheme=scheme, count=count, extent=extent, **kwds) 10402 10403 10404class SchemeParams(VegaLiteSchema): 10405 """SchemeParams schema wrapper 10406 10407 Mapping(required=[name]) 10408 10409 Attributes 10410 ---------- 10411 10412 name : string 10413 A color scheme name for ordinal scales (e.g., ``"category10"`` or ``"blues"`` ). 10414 10415 For the full list of supported schemes, please refer to the `Vega Scheme 10416 <https://vega.github.io/vega/docs/schemes/#reference>`__ reference. 10417 count : float 10418 The number of colors to use in the scheme. This can be useful for scale types such 10419 as ``"quantize"``, which use the length of the scale range to determine the number 10420 of discrete bins for the scale domain. 10421 extent : List(float) 10422 The extent of the color range to use. For example ``[0.2, 1]`` will rescale the 10423 color scheme such that color values in the range *[0, 0.2)* are excluded from the 10424 scheme. 10425 """ 10426 _schema = {'$ref': '#/definitions/SchemeParams'} 10427 10428 def __init__(self, name=Undefined, count=Undefined, extent=Undefined, **kwds): 10429 super(SchemeParams, self).__init__(name=name, count=count, extent=extent, **kwds) 10430 10431 10432class SecondaryFieldDef(VegaLiteSchema): 10433 """SecondaryFieldDef schema wrapper 10434 10435 Mapping(required=[]) 10436 A field definition of a secondary channel that shares a scale with another primary channel. 10437 For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. 10438 10439 Attributes 10440 ---------- 10441 10442 aggregate : :class:`Aggregate` 10443 Aggregation function for the field 10444 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 10445 10446 **Default value:** ``undefined`` (None) 10447 10448 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 10449 documentation. 10450 bin : None 10451 A flag for binning a ``quantitative`` field, `an object defining binning parameters 10452 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 10453 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 10454 ``"binned"`` ). 10455 10456 10457 If ``true``, default `binning parameters 10458 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 10459 10460 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 10461 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 10462 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 10463 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 10464 set the axis's `tickMinStep 10465 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 10466 10467 **Default value:** ``false`` 10468 10469 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 10470 documentation. 10471 field : :class:`Field` 10472 **Required.** A string defining the name of the field from which to pull a data 10473 value 10474 or an object defining iterated values from the `repeat 10475 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 10476 10477 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 10478 documentation. 10479 10480 **Notes:** 10481 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 10482 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 10483 If field names contain dots or brackets but are not nested, you can use ``\\`` to 10484 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 10485 See more details about escaping in the `field documentation 10486 <https://vega.github.io/vega-lite/docs/field.html>`__. 10487 2) ``field`` is not required if ``aggregate`` is ``count``. 10488 timeUnit : :class:`TimeUnit` 10489 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 10490 field. 10491 or `a temporal field that gets casted as ordinal 10492 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 10493 10494 **Default value:** ``undefined`` (None) 10495 10496 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 10497 documentation. 10498 title : anyOf(string, None) 10499 A title for the field. If ``null``, the title will be removed. 10500 10501 **Default value:** derived from the field's name and transformation function ( 10502 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 10503 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 10504 field is binned or has a time unit applied, the applied function is shown in 10505 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 10506 Otherwise, the title is simply the field name. 10507 10508 **Notes** : 10509 10510 1) You can customize the default field title format by providing the `fieldTitle 10511 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 10512 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 10513 function via the compile function's options 10514 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 10515 10516 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 10517 defined, axis/header/legend title will be used. 10518 """ 10519 _schema = {'$ref': '#/definitions/SecondaryFieldDef'} 10520 10521 def __init__(self, aggregate=Undefined, bin=Undefined, field=Undefined, timeUnit=Undefined, 10522 title=Undefined, **kwds): 10523 super(SecondaryFieldDef, self).__init__(aggregate=aggregate, bin=bin, field=field, 10524 timeUnit=timeUnit, title=title, **kwds) 10525 10526 10527class SelectionConfig(VegaLiteSchema): 10528 """SelectionConfig schema wrapper 10529 10530 Mapping(required=[]) 10531 10532 Attributes 10533 ---------- 10534 10535 interval : :class:`IntervalSelectionConfig` 10536 The default definition for an `interval 10537 <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All 10538 properties and transformations 10539 for an interval selection definition (except ``type`` ) may be specified here. 10540 10541 For instance, setting ``interval`` to ``{"translate": false}`` disables the ability 10542 to move 10543 interval selections by default. 10544 multi : :class:`MultiSelectionConfig` 10545 The default definition for a `multi 10546 <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All 10547 properties and transformations 10548 for a multi selection definition (except ``type`` ) may be specified here. 10549 10550 For instance, setting ``multi`` to ``{"toggle": "event.altKey"}`` adds additional 10551 values to 10552 multi selections when clicking with the alt-key pressed by default. 10553 single : :class:`SingleSelectionConfig` 10554 The default definition for a `single 10555 <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All 10556 properties and transformations 10557 for a single selection definition (except ``type`` ) may be specified here. 10558 10559 For instance, setting ``single`` to ``{"on": "dblclick"}`` populates single 10560 selections on double-click by default. 10561 """ 10562 _schema = {'$ref': '#/definitions/SelectionConfig'} 10563 10564 def __init__(self, interval=Undefined, multi=Undefined, single=Undefined, **kwds): 10565 super(SelectionConfig, self).__init__(interval=interval, multi=multi, single=single, **kwds) 10566 10567 10568class SelectionDef(VegaLiteSchema): 10569 """SelectionDef schema wrapper 10570 10571 anyOf(:class:`SingleSelection`, :class:`MultiSelection`, :class:`IntervalSelection`) 10572 """ 10573 _schema = {'$ref': '#/definitions/SelectionDef'} 10574 10575 def __init__(self, *args, **kwds): 10576 super(SelectionDef, self).__init__(*args, **kwds) 10577 10578 10579class IntervalSelection(SelectionDef): 10580 """IntervalSelection schema wrapper 10581 10582 Mapping(required=[type]) 10583 10584 Attributes 10585 ---------- 10586 10587 type : enum('interval') 10588 Determines the default event processing and data query for the selection. Vega-Lite 10589 currently supports three selection types: 10590 10591 10592 * ``single`` -- to select a single discrete data value on ``click``. 10593 * ``multi`` -- to select multiple discrete data value; the first value is selected 10594 on ``click`` and additional values toggled on shift- ``click``. 10595 * ``interval`` -- to select a continuous range of data values on ``drag``. 10596 bind : enum('scales') 10597 Establishes a two-way binding between the interval selection and the scales 10598 used within the same view. This allows a user to interactively pan and 10599 zoom the view. 10600 10601 **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__ 10602 documentation. 10603 clear : anyOf(:class:`EventStream`, boolean) 10604 Clears the selection, emptying it of all values. Can be an 10605 `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to 10606 disable. 10607 10608 **Default value:** ``dblclick``. 10609 10610 **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__ 10611 documentation. 10612 empty : enum('all', 'none') 10613 By default, ``all`` data values are considered to lie within an empty selection. 10614 When set to ``none``, empty selections contain no data values. 10615 encodings : List(:class:`SingleDefUnitChannel`) 10616 An array of encoding channels. The corresponding data field values 10617 must match for a data tuple to fall within the selection. 10618 10619 **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__ 10620 documentation. 10621 fields : List(:class:`FieldName`) 10622 An array of field names whose values must match for a data tuple to 10623 fall within the selection. 10624 10625 **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__ 10626 documentation. 10627 init : :class:`SelectionInitIntervalMapping` 10628 Initialize the selection with a mapping between `projected channels or field names 10629 <https://vega.github.io/vega-lite/docs/project.html>`__ and arrays of 10630 initial values. 10631 10632 **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__ 10633 documentation. 10634 mark : :class:`BrushConfig` 10635 An interval selection also adds a rectangle mark to depict the 10636 extents of the interval. The ``mark`` property can be used to customize the 10637 appearance of the mark. 10638 10639 **See also:** `mark <https://vega.github.io/vega-lite/docs/selection-mark.html>`__ 10640 documentation. 10641 on : :class:`EventStream` 10642 A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or 10643 selector) that triggers the selection. 10644 For interval selections, the event stream must specify a `start and end 10645 <https://vega.github.io/vega/docs/event-streams/#between-filters>`__. 10646 resolve : :class:`SelectionResolution` 10647 With layered and multi-view displays, a strategy that determines how 10648 selections' data queries are resolved when applied in a filter transform, 10649 conditional encoding rule, or scale domain. 10650 10651 **See also:** `resolve 10652 <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation. 10653 translate : anyOf(string, boolean) 10654 When truthy, allows a user to interactively move an interval selection 10655 back-and-forth. Can be ``true``, ``false`` (to disable panning), or a 10656 `Vega event stream definition <https://vega.github.io/vega/docs/event-streams/>`__ 10657 which must include a start and end event to trigger continuous panning. 10658 10659 **Default value:** ``true``, which corresponds to 10660 ``[mousedown, window:mouseup] > window:mousemove!`` which corresponds to 10661 clicks and dragging within an interval selection to reposition it. 10662 10663 **See also:** `translate <https://vega.github.io/vega-lite/docs/translate.html>`__ 10664 documentation. 10665 zoom : anyOf(string, boolean) 10666 When truthy, allows a user to interactively resize an interval selection. 10667 Can be ``true``, ``false`` (to disable zooming), or a `Vega event stream 10668 definition <https://vega.github.io/vega/docs/event-streams/>`__. Currently, 10669 only ``wheel`` events are supported. 10670 10671 **Default value:** ``true``, which corresponds to ``wheel!``. 10672 10673 **See also:** `zoom <https://vega.github.io/vega-lite/docs/zoom.html>`__ 10674 documentation. 10675 """ 10676 _schema = {'$ref': '#/definitions/IntervalSelection'} 10677 10678 def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined, 10679 encodings=Undefined, fields=Undefined, init=Undefined, mark=Undefined, on=Undefined, 10680 resolve=Undefined, translate=Undefined, zoom=Undefined, **kwds): 10681 super(IntervalSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty, 10682 encodings=encodings, fields=fields, init=init, 10683 mark=mark, on=on, resolve=resolve, translate=translate, 10684 zoom=zoom, **kwds) 10685 10686 10687class MultiSelection(SelectionDef): 10688 """MultiSelection schema wrapper 10689 10690 Mapping(required=[type]) 10691 10692 Attributes 10693 ---------- 10694 10695 type : enum('multi') 10696 Determines the default event processing and data query for the selection. Vega-Lite 10697 currently supports three selection types: 10698 10699 10700 * ``single`` -- to select a single discrete data value on ``click``. 10701 * ``multi`` -- to select multiple discrete data value; the first value is selected 10702 on ``click`` and additional values toggled on shift- ``click``. 10703 * ``interval`` -- to select a continuous range of data values on ``drag``. 10704 clear : anyOf(:class:`EventStream`, boolean) 10705 Clears the selection, emptying it of all values. Can be an 10706 `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to 10707 disable. 10708 10709 **Default value:** ``dblclick``. 10710 10711 **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__ 10712 documentation. 10713 empty : enum('all', 'none') 10714 By default, ``all`` data values are considered to lie within an empty selection. 10715 When set to ``none``, empty selections contain no data values. 10716 encodings : List(:class:`SingleDefUnitChannel`) 10717 An array of encoding channels. The corresponding data field values 10718 must match for a data tuple to fall within the selection. 10719 10720 **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__ 10721 documentation. 10722 fields : List(:class:`FieldName`) 10723 An array of field names whose values must match for a data tuple to 10724 fall within the selection. 10725 10726 **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__ 10727 documentation. 10728 init : anyOf(:class:`SelectionInitMapping`, List(:class:`SelectionInitMapping`)) 10729 Initialize the selection with a mapping between `projected channels or field names 10730 <https://vega.github.io/vega-lite/docs/project.html>`__ and an initial 10731 value (or array of values). 10732 10733 **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__ 10734 documentation. 10735 nearest : boolean 10736 When true, an invisible voronoi diagram is computed to accelerate discrete 10737 selection. The data value *nearest* the mouse cursor is added to the selection. 10738 10739 **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__ 10740 documentation. 10741 on : :class:`EventStream` 10742 A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or 10743 selector) that triggers the selection. 10744 For interval selections, the event stream must specify a `start and end 10745 <https://vega.github.io/vega/docs/event-streams/#between-filters>`__. 10746 resolve : :class:`SelectionResolution` 10747 With layered and multi-view displays, a strategy that determines how 10748 selections' data queries are resolved when applied in a filter transform, 10749 conditional encoding rule, or scale domain. 10750 10751 **See also:** `resolve 10752 <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation. 10753 toggle : anyOf(string, boolean) 10754 Controls whether data values should be toggled or only ever inserted into 10755 multi selections. Can be ``true``, ``false`` (for insertion only), or a 10756 `Vega expression <https://vega.github.io/vega/docs/expressions/>`__. 10757 10758 **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e., 10759 data values are toggled when a user interacts with the shift-key pressed). 10760 10761 **See also:** `toggle <https://vega.github.io/vega-lite/docs/toggle.html>`__ 10762 documentation. 10763 """ 10764 _schema = {'$ref': '#/definitions/MultiSelection'} 10765 10766 def __init__(self, type=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined, 10767 fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined, 10768 toggle=Undefined, **kwds): 10769 super(MultiSelection, self).__init__(type=type, clear=clear, empty=empty, encodings=encodings, 10770 fields=fields, init=init, nearest=nearest, on=on, 10771 resolve=resolve, toggle=toggle, **kwds) 10772 10773 10774class SelectionDomain(VegaLiteSchema): 10775 """SelectionDomain schema wrapper 10776 10777 anyOf(Mapping(required=[selection]), Mapping(required=[selection])) 10778 """ 10779 _schema = {'$ref': '#/definitions/SelectionDomain'} 10780 10781 def __init__(self, *args, **kwds): 10782 super(SelectionDomain, self).__init__(*args, **kwds) 10783 10784 10785class SelectionInit(VegaLiteSchema): 10786 """SelectionInit schema wrapper 10787 10788 anyOf(boolean, float, string, :class:`DateTime`) 10789 """ 10790 _schema = {'$ref': '#/definitions/SelectionInit'} 10791 10792 def __init__(self, *args, **kwds): 10793 super(SelectionInit, self).__init__(*args, **kwds) 10794 10795 10796class DateTime(SelectionInit): 10797 """DateTime schema wrapper 10798 10799 Mapping(required=[]) 10800 Object for defining datetime in Vega-Lite Filter. 10801 If both month and quarter are provided, month has higher precedence. 10802 ``day`` cannot be combined with other date. 10803 We accept string for month and day names. 10804 10805 Attributes 10806 ---------- 10807 10808 date : float 10809 Integer value representing the date from 1-31. 10810 day : anyOf(:class:`Day`, string) 10811 Value representing the day of a week. This can be one of: (1) integer value -- 10812 ``1`` represents Monday; (2) case-insensitive day name (e.g., ``"Monday"`` ); (3) 10813 case-insensitive, 3-character short day name (e.g., ``"Mon"`` ). :raw-html:`<br/>` 10814 **Warning:** A DateTime definition object with ``day`` ** should not be combined 10815 with ``year``, ``quarter``, ``month``, or ``date``. 10816 hours : float 10817 Integer value representing the hour of a day from 0-23. 10818 milliseconds : float 10819 Integer value representing the millisecond segment of time. 10820 minutes : float 10821 Integer value representing the minute segment of time from 0-59. 10822 month : anyOf(:class:`Month`, string) 10823 One of: (1) integer value representing the month from ``1`` - ``12``. ``1`` 10824 represents January; (2) case-insensitive month name (e.g., ``"January"`` ); (3) 10825 case-insensitive, 3-character short month name (e.g., ``"Jan"`` ). 10826 quarter : float 10827 Integer value representing the quarter of the year (from 1-4). 10828 seconds : float 10829 Integer value representing the second segment (0-59) of a time value 10830 utc : boolean 10831 A boolean flag indicating if date time is in utc time. If false, the date time is in 10832 local time 10833 year : float 10834 Integer value representing the year. 10835 """ 10836 _schema = {'$ref': '#/definitions/DateTime'} 10837 10838 def __init__(self, date=Undefined, day=Undefined, hours=Undefined, milliseconds=Undefined, 10839 minutes=Undefined, month=Undefined, quarter=Undefined, seconds=Undefined, 10840 utc=Undefined, year=Undefined, **kwds): 10841 super(DateTime, self).__init__(date=date, day=day, hours=hours, milliseconds=milliseconds, 10842 minutes=minutes, month=month, quarter=quarter, seconds=seconds, 10843 utc=utc, year=year, **kwds) 10844 10845 10846class SelectionInitInterval(VegaLiteSchema): 10847 """SelectionInitInterval schema wrapper 10848 10849 anyOf(List([boolean, boolean]), List([float, float]), List([string, string]), 10850 List([:class:`DateTime`, :class:`DateTime`])) 10851 """ 10852 _schema = {'$ref': '#/definitions/SelectionInitInterval'} 10853 10854 def __init__(self, *args, **kwds): 10855 super(SelectionInitInterval, self).__init__(*args, **kwds) 10856 10857 10858class SelectionInitIntervalMapping(VegaLiteSchema): 10859 """SelectionInitIntervalMapping schema wrapper 10860 10861 Mapping(required=[]) 10862 """ 10863 _schema = {'$ref': '#/definitions/SelectionInitIntervalMapping'} 10864 10865 def __init__(self, **kwds): 10866 super(SelectionInitIntervalMapping, self).__init__(**kwds) 10867 10868 10869class SelectionInitMapping(VegaLiteSchema): 10870 """SelectionInitMapping schema wrapper 10871 10872 Mapping(required=[]) 10873 """ 10874 _schema = {'$ref': '#/definitions/SelectionInitMapping'} 10875 10876 def __init__(self, **kwds): 10877 super(SelectionInitMapping, self).__init__(**kwds) 10878 10879 10880class SelectionOperand(VegaLiteSchema): 10881 """SelectionOperand schema wrapper 10882 10883 anyOf(:class:`SelectionNot`, :class:`SelectionAnd`, :class:`SelectionOr`, string) 10884 """ 10885 _schema = {'$ref': '#/definitions/SelectionOperand'} 10886 10887 def __init__(self, *args, **kwds): 10888 super(SelectionOperand, self).__init__(*args, **kwds) 10889 10890 10891class SelectionAnd(SelectionOperand): 10892 """SelectionAnd schema wrapper 10893 10894 Mapping(required=[and]) 10895 10896 Attributes 10897 ---------- 10898 10899 and : List(:class:`SelectionOperand`) 10900 10901 """ 10902 _schema = {'$ref': '#/definitions/SelectionAnd'} 10903 10904 def __init__(self, **kwds): 10905 super(SelectionAnd, self).__init__(**kwds) 10906 10907 10908class SelectionNot(SelectionOperand): 10909 """SelectionNot schema wrapper 10910 10911 Mapping(required=[not]) 10912 10913 Attributes 10914 ---------- 10915 10916 not : :class:`SelectionOperand` 10917 10918 """ 10919 _schema = {'$ref': '#/definitions/SelectionNot'} 10920 10921 def __init__(self, **kwds): 10922 super(SelectionNot, self).__init__(**kwds) 10923 10924 10925class SelectionOr(SelectionOperand): 10926 """SelectionOr schema wrapper 10927 10928 Mapping(required=[or]) 10929 10930 Attributes 10931 ---------- 10932 10933 or : List(:class:`SelectionOperand`) 10934 10935 """ 10936 _schema = {'$ref': '#/definitions/SelectionOr'} 10937 10938 def __init__(self, **kwds): 10939 super(SelectionOr, self).__init__(**kwds) 10940 10941 10942class SelectionPredicate(Predicate): 10943 """SelectionPredicate schema wrapper 10944 10945 Mapping(required=[selection]) 10946 10947 Attributes 10948 ---------- 10949 10950 selection : :class:`SelectionOperand` 10951 Filter using a selection name. 10952 """ 10953 _schema = {'$ref': '#/definitions/SelectionPredicate'} 10954 10955 def __init__(self, selection=Undefined, **kwds): 10956 super(SelectionPredicate, self).__init__(selection=selection, **kwds) 10957 10958 10959class SelectionResolution(VegaLiteSchema): 10960 """SelectionResolution schema wrapper 10961 10962 enum('global', 'union', 'intersect') 10963 """ 10964 _schema = {'$ref': '#/definitions/SelectionResolution'} 10965 10966 def __init__(self, *args): 10967 super(SelectionResolution, self).__init__(*args) 10968 10969 10970class SequenceGenerator(Generator): 10971 """SequenceGenerator schema wrapper 10972 10973 Mapping(required=[sequence]) 10974 10975 Attributes 10976 ---------- 10977 10978 sequence : :class:`SequenceParams` 10979 Generate a sequence of numbers. 10980 name : string 10981 Provide a placeholder name and bind data at runtime. 10982 """ 10983 _schema = {'$ref': '#/definitions/SequenceGenerator'} 10984 10985 def __init__(self, sequence=Undefined, name=Undefined, **kwds): 10986 super(SequenceGenerator, self).__init__(sequence=sequence, name=name, **kwds) 10987 10988 10989class SequenceParams(VegaLiteSchema): 10990 """SequenceParams schema wrapper 10991 10992 Mapping(required=[start, stop]) 10993 10994 Attributes 10995 ---------- 10996 10997 start : float 10998 The starting value of the sequence (inclusive). 10999 stop : float 11000 The ending value of the sequence (exclusive). 11001 step : float 11002 The step value between sequence entries. 11003 11004 **Default value:** ``1`` 11005 as : :class:`FieldName` 11006 The name of the generated sequence field. 11007 11008 **Default value:** ``"data"`` 11009 """ 11010 _schema = {'$ref': '#/definitions/SequenceParams'} 11011 11012 def __init__(self, start=Undefined, stop=Undefined, step=Undefined, **kwds): 11013 super(SequenceParams, self).__init__(start=start, stop=stop, step=step, **kwds) 11014 11015 11016class ShapeFieldDefWithCondition(VegaLiteSchema): 11017 """ShapeFieldDefWithCondition schema wrapper 11018 11019 Mapping(required=[type]) 11020 A FieldDef with Condition :raw-html:`<ValueDef>` 11021 11022 Attributes 11023 ---------- 11024 11025 type : :class:`TypeForShape` 11026 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 11027 ``"ordinal"``, or ``"nominal"`` ). 11028 It can also be a ``"geojson"`` type for encoding `'geoshape' 11029 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 11030 11031 **Note:** 11032 11033 11034 * Data values for a temporal field can be either a date-time string (e.g., 11035 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 11036 timestamp number (e.g., ``1552199579097`` ). 11037 * Data ``type`` describes the semantics of the data rather than the primitive data 11038 types ( ``number``, ``string``, etc.). The same primitive data type can have 11039 different types of measurement. For example, numeric data can represent 11040 quantitative, ordinal, or nominal data. 11041 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 11042 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 11043 or `"ordinal" (for using an ordinal bin scale) 11044 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 11045 * When using with `timeUnit 11046 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 11047 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 11048 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 11049 * When using with `aggregate 11050 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 11051 refers to the post-aggregation data type. For example, we can calculate count 11052 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 11053 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 11054 is ``"quantitative"``. 11055 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 11056 ``type`` as they have exactly the same type as their primary channels (e.g., 11057 ``x``, ``y`` ). 11058 11059 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 11060 documentation. 11061 aggregate : :class:`Aggregate` 11062 Aggregation function for the field 11063 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 11064 11065 **Default value:** ``undefined`` (None) 11066 11067 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 11068 documentation. 11069 bin : anyOf(boolean, :class:`BinParams`, None) 11070 A flag for binning a ``quantitative`` field, `an object defining binning parameters 11071 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 11072 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 11073 ``"binned"`` ). 11074 11075 11076 If ``true``, default `binning parameters 11077 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 11078 11079 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 11080 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 11081 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 11082 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 11083 set the axis's `tickMinStep 11084 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 11085 11086 **Default value:** ``false`` 11087 11088 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 11089 documentation. 11090 condition : anyOf(:class:`ConditionalStringValueDef`, 11091 List(:class:`ConditionalStringValueDef`)) 11092 One or more value definition(s) with `a selection or a test predicate 11093 <https://vega.github.io/vega-lite/docs/condition.html>`__. 11094 11095 **Note:** A field definition's ``condition`` property can only contain `conditional 11096 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 11097 since Vega-Lite only allows at most one encoded field per encoding channel. 11098 field : :class:`Field` 11099 **Required.** A string defining the name of the field from which to pull a data 11100 value 11101 or an object defining iterated values from the `repeat 11102 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 11103 11104 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 11105 documentation. 11106 11107 **Notes:** 11108 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 11109 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 11110 If field names contain dots or brackets but are not nested, you can use ``\\`` to 11111 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 11112 See more details about escaping in the `field documentation 11113 <https://vega.github.io/vega-lite/docs/field.html>`__. 11114 2) ``field`` is not required if ``aggregate`` is ``count``. 11115 legend : anyOf(:class:`Legend`, None) 11116 An object defining properties of the legend. 11117 If ``null``, the legend for the encoding channel will be removed. 11118 11119 **Default value:** If undefined, default `legend properties 11120 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 11121 11122 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 11123 documentation. 11124 scale : anyOf(:class:`Scale`, None) 11125 An object defining properties of the channel's scale, which is the function that 11126 transforms values in the data domain (numbers, dates, strings, etc) to visual values 11127 (pixels, colors, sizes) of the encoding channels. 11128 11129 If ``null``, the scale will be `disabled and the data value will be directly encoded 11130 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 11131 11132 **Default value:** If undefined, default `scale properties 11133 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 11134 11135 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 11136 documentation. 11137 sort : :class:`Sort` 11138 Sort order for the encoded field. 11139 11140 For continuous fields (quantitative or temporal), ``sort`` can be either 11141 ``"ascending"`` or ``"descending"``. 11142 11143 For discrete fields, ``sort`` can be one of the following: 11144 11145 11146 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 11147 Javascript. 11148 * `A sort-by-encoding definition 11149 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 11150 by another encoding channel. (This type of sort definition is not available for 11151 ``row`` and ``column`` channels.) 11152 * `A sort field definition 11153 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 11154 another field. 11155 * `An array specifying the field values in preferred order 11156 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 11157 sort order will obey the values in the array, followed by any unspecified values 11158 in their original order. For discrete time field, values in the sort array can be 11159 `date-time definition objects <types#datetime>`__. In addition, for time units 11160 ``"month"`` and ``"day"``, the values can be the month or day names (case 11161 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 11162 * ``null`` indicating no sort. 11163 11164 **Default value:** ``"ascending"`` 11165 11166 **Note:** ``null`` is not supported for ``row`` and ``column``. 11167 11168 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 11169 documentation. 11170 timeUnit : :class:`TimeUnit` 11171 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 11172 field. 11173 or `a temporal field that gets casted as ordinal 11174 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 11175 11176 **Default value:** ``undefined`` (None) 11177 11178 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 11179 documentation. 11180 title : anyOf(string, None) 11181 A title for the field. If ``null``, the title will be removed. 11182 11183 **Default value:** derived from the field's name and transformation function ( 11184 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 11185 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 11186 field is binned or has a time unit applied, the applied function is shown in 11187 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 11188 Otherwise, the title is simply the field name. 11189 11190 **Notes** : 11191 11192 1) You can customize the default field title format by providing the `fieldTitle 11193 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 11194 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 11195 function via the compile function's options 11196 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 11197 11198 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 11199 defined, axis/header/legend title will be used. 11200 """ 11201 _schema = {'$ref': '#/definitions/ShapeFieldDefWithCondition'} 11202 11203 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 11204 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 11205 title=Undefined, **kwds): 11206 super(ShapeFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin, 11207 condition=condition, field=field, 11208 legend=legend, scale=scale, sort=sort, 11209 timeUnit=timeUnit, title=title, **kwds) 11210 11211 11212class ShapeValueDefWithCondition(VegaLiteSchema): 11213 """ShapeValueDefWithCondition schema wrapper 11214 11215 Mapping(required=[]) 11216 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 11217 optional. 11218 11219 Attributes 11220 ---------- 11221 11222 condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`, 11223 :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`)) 11224 A field definition or one or more value definition(s) with a selection predicate. 11225 value : anyOf(string, None) 11226 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 11227 between ``0`` to ``1`` for opacity). 11228 """ 11229 _schema = {'$ref': '#/definitions/ShapeValueDefWithCondition'} 11230 11231 def __init__(self, condition=Undefined, value=Undefined, **kwds): 11232 super(ShapeValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds) 11233 11234 11235class SignalRef(LayoutBounds): 11236 """SignalRef schema wrapper 11237 11238 Mapping(required=[signal]) 11239 11240 Attributes 11241 ---------- 11242 11243 signal : string 11244 11245 """ 11246 _schema = {'$ref': '#/definitions/SignalRef'} 11247 11248 def __init__(self, signal=Undefined, **kwds): 11249 super(SignalRef, self).__init__(signal=signal, **kwds) 11250 11251 11252class SingleDefUnitChannel(VegaLiteSchema): 11253 """SingleDefUnitChannel schema wrapper 11254 11255 enum('x', 'y', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'color', 11256 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'size', 'shape', 11257 'key', 'text', 'tooltip', 'href') 11258 """ 11259 _schema = {'$ref': '#/definitions/SingleDefUnitChannel'} 11260 11261 def __init__(self, *args): 11262 super(SingleDefUnitChannel, self).__init__(*args) 11263 11264 11265class SingleSelection(SelectionDef): 11266 """SingleSelection schema wrapper 11267 11268 Mapping(required=[type]) 11269 11270 Attributes 11271 ---------- 11272 11273 type : enum('single') 11274 Determines the default event processing and data query for the selection. Vega-Lite 11275 currently supports three selection types: 11276 11277 11278 * ``single`` -- to select a single discrete data value on ``click``. 11279 * ``multi`` -- to select multiple discrete data value; the first value is selected 11280 on ``click`` and additional values toggled on shift- ``click``. 11281 * ``interval`` -- to select a continuous range of data values on ``drag``. 11282 bind : anyOf(:class:`Binding`, Mapping(required=[])) 11283 Establish a two-way binding between a single selection and input elements 11284 (also known as dynamic query widgets). A binding takes the form of 11285 Vega's `input element binding definition 11286 <https://vega.github.io/vega/docs/signals/#bind>`__ 11287 or can be a mapping between projected field/encodings and binding definitions. 11288 11289 **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__ 11290 documentation. 11291 clear : anyOf(:class:`EventStream`, boolean) 11292 Clears the selection, emptying it of all values. Can be an 11293 `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to 11294 disable. 11295 11296 **Default value:** ``dblclick``. 11297 11298 **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__ 11299 documentation. 11300 empty : enum('all', 'none') 11301 By default, ``all`` data values are considered to lie within an empty selection. 11302 When set to ``none``, empty selections contain no data values. 11303 encodings : List(:class:`SingleDefUnitChannel`) 11304 An array of encoding channels. The corresponding data field values 11305 must match for a data tuple to fall within the selection. 11306 11307 **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__ 11308 documentation. 11309 fields : List(:class:`FieldName`) 11310 An array of field names whose values must match for a data tuple to 11311 fall within the selection. 11312 11313 **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__ 11314 documentation. 11315 init : :class:`SelectionInitMapping` 11316 Initialize the selection with a mapping between `projected channels or field names 11317 <https://vega.github.io/vega-lite/docs/project.html>`__ and initial values. 11318 11319 **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__ 11320 documentation. 11321 nearest : boolean 11322 When true, an invisible voronoi diagram is computed to accelerate discrete 11323 selection. The data value *nearest* the mouse cursor is added to the selection. 11324 11325 **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__ 11326 documentation. 11327 on : :class:`EventStream` 11328 A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or 11329 selector) that triggers the selection. 11330 For interval selections, the event stream must specify a `start and end 11331 <https://vega.github.io/vega/docs/event-streams/#between-filters>`__. 11332 resolve : :class:`SelectionResolution` 11333 With layered and multi-view displays, a strategy that determines how 11334 selections' data queries are resolved when applied in a filter transform, 11335 conditional encoding rule, or scale domain. 11336 11337 **See also:** `resolve 11338 <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation. 11339 """ 11340 _schema = {'$ref': '#/definitions/SingleSelection'} 11341 11342 def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined, 11343 encodings=Undefined, fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, 11344 resolve=Undefined, **kwds): 11345 super(SingleSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty, 11346 encodings=encodings, fields=fields, init=init, 11347 nearest=nearest, on=on, resolve=resolve, **kwds) 11348 11349 11350class SingleSelectionConfig(VegaLiteSchema): 11351 """SingleSelectionConfig schema wrapper 11352 11353 Mapping(required=[]) 11354 11355 Attributes 11356 ---------- 11357 11358 bind : anyOf(:class:`Binding`, Mapping(required=[])) 11359 Establish a two-way binding between a single selection and input elements 11360 (also known as dynamic query widgets). A binding takes the form of 11361 Vega's `input element binding definition 11362 <https://vega.github.io/vega/docs/signals/#bind>`__ 11363 or can be a mapping between projected field/encodings and binding definitions. 11364 11365 **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__ 11366 documentation. 11367 clear : anyOf(:class:`EventStream`, boolean) 11368 Clears the selection, emptying it of all values. Can be an 11369 `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to 11370 disable. 11371 11372 **Default value:** ``dblclick``. 11373 11374 **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__ 11375 documentation. 11376 empty : enum('all', 'none') 11377 By default, ``all`` data values are considered to lie within an empty selection. 11378 When set to ``none``, empty selections contain no data values. 11379 encodings : List(:class:`SingleDefUnitChannel`) 11380 An array of encoding channels. The corresponding data field values 11381 must match for a data tuple to fall within the selection. 11382 11383 **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__ 11384 documentation. 11385 fields : List(:class:`FieldName`) 11386 An array of field names whose values must match for a data tuple to 11387 fall within the selection. 11388 11389 **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__ 11390 documentation. 11391 init : :class:`SelectionInitMapping` 11392 Initialize the selection with a mapping between `projected channels or field names 11393 <https://vega.github.io/vega-lite/docs/project.html>`__ and initial values. 11394 11395 **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__ 11396 documentation. 11397 nearest : boolean 11398 When true, an invisible voronoi diagram is computed to accelerate discrete 11399 selection. The data value *nearest* the mouse cursor is added to the selection. 11400 11401 **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__ 11402 documentation. 11403 on : :class:`EventStream` 11404 A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or 11405 selector) that triggers the selection. 11406 For interval selections, the event stream must specify a `start and end 11407 <https://vega.github.io/vega/docs/event-streams/#between-filters>`__. 11408 resolve : :class:`SelectionResolution` 11409 With layered and multi-view displays, a strategy that determines how 11410 selections' data queries are resolved when applied in a filter transform, 11411 conditional encoding rule, or scale domain. 11412 11413 **See also:** `resolve 11414 <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation. 11415 """ 11416 _schema = {'$ref': '#/definitions/SingleSelectionConfig'} 11417 11418 def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined, 11419 fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined, 11420 **kwds): 11421 super(SingleSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty, 11422 encodings=encodings, fields=fields, init=init, 11423 nearest=nearest, on=on, resolve=resolve, **kwds) 11424 11425 11426class Sort(VegaLiteSchema): 11427 """Sort schema wrapper 11428 11429 anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, 11430 :class:`SortByEncoding`, None) 11431 """ 11432 _schema = {'$ref': '#/definitions/Sort'} 11433 11434 def __init__(self, *args, **kwds): 11435 super(Sort, self).__init__(*args, **kwds) 11436 11437 11438class EncodingSortField(Sort): 11439 """EncodingSortField schema wrapper 11440 11441 Mapping(required=[]) 11442 A sort definition for sorting a discrete scale in an encoding field definition. 11443 11444 Attributes 11445 ---------- 11446 11447 field : :class:`Field` 11448 The data `field <https://vega.github.io/vega-lite/docs/field.html>`__ to sort by. 11449 11450 **Default value:** If unspecified, defaults to the field specified in the outer data 11451 reference. 11452 op : :class:`AggregateOp` 11453 An `aggregate operation 11454 <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ to perform on the 11455 field prior to sorting (e.g., ``"count"``, ``"mean"`` and ``"median"`` ). 11456 An aggregation is required when there are multiple values of the sort field for each 11457 encoded data field. 11458 The input data objects will be aggregated, grouped by the encoded data field. 11459 11460 For a full list of operations, please see the documentation for `aggregate 11461 <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__. 11462 11463 **Default value:** ``"sum"`` for stacked plots. Otherwise, ``"mean"``. 11464 order : anyOf(:class:`SortOrder`, None) 11465 The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no 11466 not sort). 11467 """ 11468 _schema = {'$ref': '#/definitions/EncodingSortField'} 11469 11470 def __init__(self, field=Undefined, op=Undefined, order=Undefined, **kwds): 11471 super(EncodingSortField, self).__init__(field=field, op=op, order=order, **kwds) 11472 11473 11474class SortArray(Sort): 11475 """SortArray schema wrapper 11476 11477 anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`)) 11478 """ 11479 _schema = {'$ref': '#/definitions/SortArray'} 11480 11481 def __init__(self, *args, **kwds): 11482 super(SortArray, self).__init__(*args, **kwds) 11483 11484 11485class SortByEncoding(Sort): 11486 """SortByEncoding schema wrapper 11487 11488 Mapping(required=[encoding]) 11489 11490 Attributes 11491 ---------- 11492 11493 encoding : :class:`SingleDefUnitChannel` 11494 The `encoding channel 11495 <https://vega.github.io/vega-lite/docs/encoding.html#channels>`__ to sort by (e.g., 11496 ``"x"``, ``"y"`` ) 11497 order : anyOf(:class:`SortOrder`, None) 11498 The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no 11499 not sort). 11500 """ 11501 _schema = {'$ref': '#/definitions/SortByEncoding'} 11502 11503 def __init__(self, encoding=Undefined, order=Undefined, **kwds): 11504 super(SortByEncoding, self).__init__(encoding=encoding, order=order, **kwds) 11505 11506 11507class SortField(VegaLiteSchema): 11508 """SortField schema wrapper 11509 11510 Mapping(required=[field]) 11511 A sort definition for transform 11512 11513 Attributes 11514 ---------- 11515 11516 field : :class:`FieldName` 11517 The name of the field to sort. 11518 order : anyOf(:class:`SortOrder`, None) 11519 Whether to sort the field in ascending or descending order. One of ``"ascending"`` 11520 (default), ``"descending"``, or ``null`` (no not sort). 11521 """ 11522 _schema = {'$ref': '#/definitions/SortField'} 11523 11524 def __init__(self, field=Undefined, order=Undefined, **kwds): 11525 super(SortField, self).__init__(field=field, order=order, **kwds) 11526 11527 11528class SortOrder(Sort): 11529 """SortOrder schema wrapper 11530 11531 enum('ascending', 'descending') 11532 """ 11533 _schema = {'$ref': '#/definitions/SortOrder'} 11534 11535 def __init__(self, *args): 11536 super(SortOrder, self).__init__(*args) 11537 11538 11539class Spec(VegaLiteSchema): 11540 """Spec schema wrapper 11541 11542 anyOf(:class:`FacetedUnitSpec`, :class:`LayerSpec`, :class:`FacetSpec`, :class:`RepeatSpec`, 11543 :class:`ConcatSpec`, :class:`VConcatSpec`, :class:`HConcatSpec`) 11544 Any specification in Vega-Lite. 11545 """ 11546 _schema = {'$ref': '#/definitions/Spec'} 11547 11548 def __init__(self, *args, **kwds): 11549 super(Spec, self).__init__(*args, **kwds) 11550 11551 11552class ConcatSpec(Spec): 11553 """ConcatSpec schema wrapper 11554 11555 Mapping(required=[concat]) 11556 Base interface for a generalized concatenation specification. 11557 11558 Attributes 11559 ---------- 11560 11561 concat : List(:class:`Spec`) 11562 A list of views to be concatenated. 11563 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 11564 The alignment to apply to grid rows and columns. 11565 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 11566 11567 11568 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 11569 placed one after the other. 11570 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 11571 or column may be of variable size. 11572 * For ``"all"``, subviews will be aligned and each row or column will be sized 11573 identically based on the maximum observed size. String values for this property 11574 will be applied to both grid rows and columns. 11575 11576 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 11577 be used to supply different alignments for rows and columns. 11578 11579 **Default value:** ``"all"``. 11580 bounds : enum('full', 'flush') 11581 The bounds calculation method to use for determining the extent of a sub-plot. One 11582 of ``full`` (the default) or ``flush``. 11583 11584 11585 * If set to ``full``, the entire calculated bounds (including axes, title, and 11586 legend) will be used. 11587 * If set to ``flush``, only the specified width and height values for the sub-view 11588 will be used. The ``flush`` setting can be useful when attempting to place 11589 sub-plots without axes or legends into a uniform grid structure. 11590 11591 **Default value:** ``"full"`` 11592 center : anyOf(boolean, :class:`RowColboolean`) 11593 Boolean flag indicating if subviews should be centered relative to their respective 11594 rows or columns. 11595 11596 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 11597 supply different centering values for rows and columns. 11598 11599 **Default value:** ``false`` 11600 columns : float 11601 The number of columns to include in the view composition layout. 11602 11603 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 11604 will be assumed. This is equivalent to 11605 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 11606 ``repeat`` ). 11607 11608 **Note** : 11609 11610 1) This property is only for: 11611 11612 11613 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 11614 * the ``facet`` and ``repeat`` operator with one field/repetition definition 11615 (without row/column nesting) 11616 11617 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 11618 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 11619 data : anyOf(:class:`Data`, None) 11620 An object describing the data source. Set to ``null`` to ignore the parent's data 11621 source. If no data is set, it is derived from the parent. 11622 description : string 11623 Description of this mark for commenting purpose. 11624 name : string 11625 Name of the visualization for later reference. 11626 resolve : :class:`Resolve` 11627 Scale, axis, and legend resolutions for view composition specifications. 11628 spacing : anyOf(float, :class:`RowColnumber`) 11629 The spacing in pixels between sub-views of the composition operator. 11630 An object of the form ``{"row": number, "column": number}`` can be used to set 11631 different spacing values for rows and columns. 11632 11633 **Default value** : Depends on ``"spacing"`` property of `the view composition 11634 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 11635 ``20`` by default) 11636 title : anyOf(string, :class:`TitleParams`) 11637 Title for the plot. 11638 transform : List(:class:`Transform`) 11639 An array of data transformations such as filter and new field calculation. 11640 """ 11641 _schema = {'$ref': '#/definitions/ConcatSpec'} 11642 11643 def __init__(self, concat=Undefined, align=Undefined, bounds=Undefined, center=Undefined, 11644 columns=Undefined, data=Undefined, description=Undefined, name=Undefined, 11645 resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, **kwds): 11646 super(ConcatSpec, self).__init__(concat=concat, align=align, bounds=bounds, center=center, 11647 columns=columns, data=data, description=description, name=name, 11648 resolve=resolve, spacing=spacing, title=title, 11649 transform=transform, **kwds) 11650 11651 11652class FacetSpec(Spec): 11653 """FacetSpec schema wrapper 11654 11655 Mapping(required=[facet, spec]) 11656 Base interface for a facet specification. 11657 11658 Attributes 11659 ---------- 11660 11661 facet : anyOf(:class:`FacetFieldDef`, :class:`FacetMapping`) 11662 Definition for how to facet the data. One of: 11663 1) `a field definition for faceting the plot by one field 11664 <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 11665 2) `An object that maps row and column channels to their field definitions 11666 <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__ 11667 spec : anyOf(:class:`LayerSpec`, :class:`FacetedUnitSpec`) 11668 A specification of the view that gets faceted. 11669 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 11670 The alignment to apply to grid rows and columns. 11671 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 11672 11673 11674 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 11675 placed one after the other. 11676 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 11677 or column may be of variable size. 11678 * For ``"all"``, subviews will be aligned and each row or column will be sized 11679 identically based on the maximum observed size. String values for this property 11680 will be applied to both grid rows and columns. 11681 11682 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 11683 be used to supply different alignments for rows and columns. 11684 11685 **Default value:** ``"all"``. 11686 bounds : enum('full', 'flush') 11687 The bounds calculation method to use for determining the extent of a sub-plot. One 11688 of ``full`` (the default) or ``flush``. 11689 11690 11691 * If set to ``full``, the entire calculated bounds (including axes, title, and 11692 legend) will be used. 11693 * If set to ``flush``, only the specified width and height values for the sub-view 11694 will be used. The ``flush`` setting can be useful when attempting to place 11695 sub-plots without axes or legends into a uniform grid structure. 11696 11697 **Default value:** ``"full"`` 11698 center : anyOf(boolean, :class:`RowColboolean`) 11699 Boolean flag indicating if subviews should be centered relative to their respective 11700 rows or columns. 11701 11702 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 11703 supply different centering values for rows and columns. 11704 11705 **Default value:** ``false`` 11706 columns : float 11707 The number of columns to include in the view composition layout. 11708 11709 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 11710 will be assumed. This is equivalent to 11711 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 11712 ``repeat`` ). 11713 11714 **Note** : 11715 11716 1) This property is only for: 11717 11718 11719 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 11720 * the ``facet`` and ``repeat`` operator with one field/repetition definition 11721 (without row/column nesting) 11722 11723 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 11724 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 11725 data : anyOf(:class:`Data`, None) 11726 An object describing the data source. Set to ``null`` to ignore the parent's data 11727 source. If no data is set, it is derived from the parent. 11728 description : string 11729 Description of this mark for commenting purpose. 11730 name : string 11731 Name of the visualization for later reference. 11732 resolve : :class:`Resolve` 11733 Scale, axis, and legend resolutions for view composition specifications. 11734 spacing : anyOf(float, :class:`RowColnumber`) 11735 The spacing in pixels between sub-views of the composition operator. 11736 An object of the form ``{"row": number, "column": number}`` can be used to set 11737 different spacing values for rows and columns. 11738 11739 **Default value** : Depends on ``"spacing"`` property of `the view composition 11740 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 11741 ``20`` by default) 11742 title : anyOf(string, :class:`TitleParams`) 11743 Title for the plot. 11744 transform : List(:class:`Transform`) 11745 An array of data transformations such as filter and new field calculation. 11746 """ 11747 _schema = {'$ref': '#/definitions/FacetSpec'} 11748 11749 def __init__(self, facet=Undefined, spec=Undefined, align=Undefined, bounds=Undefined, 11750 center=Undefined, columns=Undefined, data=Undefined, description=Undefined, 11751 name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, 11752 transform=Undefined, **kwds): 11753 super(FacetSpec, self).__init__(facet=facet, spec=spec, align=align, bounds=bounds, 11754 center=center, columns=columns, data=data, 11755 description=description, name=name, resolve=resolve, 11756 spacing=spacing, title=title, transform=transform, **kwds) 11757 11758 11759class FacetedUnitSpec(Spec): 11760 """FacetedUnitSpec schema wrapper 11761 11762 Mapping(required=[mark]) 11763 Unit spec that can have a composite mark and row or column channels (shorthand for a facet 11764 spec). 11765 11766 Attributes 11767 ---------- 11768 11769 mark : :class:`AnyMark` 11770 A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, 11771 ``"tick"``, ``"line"``, 11772 ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark 11773 definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. 11774 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 11775 The alignment to apply to grid rows and columns. 11776 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 11777 11778 11779 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 11780 placed one after the other. 11781 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 11782 or column may be of variable size. 11783 * For ``"all"``, subviews will be aligned and each row or column will be sized 11784 identically based on the maximum observed size. String values for this property 11785 will be applied to both grid rows and columns. 11786 11787 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 11788 be used to supply different alignments for rows and columns. 11789 11790 **Default value:** ``"all"``. 11791 bounds : enum('full', 'flush') 11792 The bounds calculation method to use for determining the extent of a sub-plot. One 11793 of ``full`` (the default) or ``flush``. 11794 11795 11796 * If set to ``full``, the entire calculated bounds (including axes, title, and 11797 legend) will be used. 11798 * If set to ``flush``, only the specified width and height values for the sub-view 11799 will be used. The ``flush`` setting can be useful when attempting to place 11800 sub-plots without axes or legends into a uniform grid structure. 11801 11802 **Default value:** ``"full"`` 11803 center : anyOf(boolean, :class:`RowColboolean`) 11804 Boolean flag indicating if subviews should be centered relative to their respective 11805 rows or columns. 11806 11807 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 11808 supply different centering values for rows and columns. 11809 11810 **Default value:** ``false`` 11811 columns : float 11812 The number of columns to include in the view composition layout. 11813 11814 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 11815 will be assumed. This is equivalent to 11816 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 11817 ``repeat`` ). 11818 11819 **Note** : 11820 11821 1) This property is only for: 11822 11823 11824 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 11825 * the ``facet`` and ``repeat`` operator with one field/repetition definition 11826 (without row/column nesting) 11827 11828 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 11829 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 11830 data : anyOf(:class:`Data`, None) 11831 An object describing the data source. Set to ``null`` to ignore the parent's data 11832 source. If no data is set, it is derived from the parent. 11833 description : string 11834 Description of this mark for commenting purpose. 11835 encoding : :class:`FacetedEncoding` 11836 A key-value mapping between encoding channels and definition of fields. 11837 height : float 11838 The height of a visualization. 11839 11840 **Default value:** 11841 11842 11843 * If a view's `autosize 11844 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 11845 its y-channel has a `continuous scale 11846 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will 11847 be the value of `config.view.height 11848 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 11849 * For y-axis with a band or point scale: if `rangeStep 11850 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 11851 unspecified, the height is `determined by the range step, paddings, and the 11852 cardinality of the field mapped to y-channel 11853 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 11854 ``rangeStep`` is ``null``, the height will be the value of `config.view.height 11855 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 11856 * If no field is mapped to ``y`` channel, the ``height`` will be the value of 11857 ``rangeStep``. 11858 11859 **Note** : For plots with `row and column channels 11860 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 11861 height of a single view. 11862 11863 **See also:** The documentation for `width and height 11864 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 11865 name : string 11866 Name of the visualization for later reference. 11867 projection : :class:`Projection` 11868 An object defining properties of geographic projection, which will be applied to 11869 ``shape`` path for ``"geoshape"`` marks 11870 and to ``latitude`` and ``"longitude"`` channels for other marks. 11871 resolve : :class:`Resolve` 11872 Scale, axis, and legend resolutions for view composition specifications. 11873 selection : Mapping(required=[]) 11874 A key-value mapping between selection names and definitions. 11875 spacing : anyOf(float, :class:`RowColnumber`) 11876 The spacing in pixels between sub-views of the composition operator. 11877 An object of the form ``{"row": number, "column": number}`` can be used to set 11878 different spacing values for rows and columns. 11879 11880 **Default value** : Depends on ``"spacing"`` property of `the view composition 11881 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 11882 ``20`` by default) 11883 title : anyOf(string, :class:`TitleParams`) 11884 Title for the plot. 11885 transform : List(:class:`Transform`) 11886 An array of data transformations such as filter and new field calculation. 11887 view : :class:`ViewBackground` 11888 An object defining the view background's fill and stroke. 11889 11890 **Default value:** none (transparent) 11891 width : float 11892 The width of a visualization. 11893 11894 **Default value:** This will be determined by the following rules: 11895 11896 11897 * If a view's `autosize 11898 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 11899 its x-channel has a `continuous scale 11900 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will 11901 be the value of `config.view.width 11902 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 11903 * For x-axis with a band or point scale: if `rangeStep 11904 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 11905 unspecified, the width is `determined by the range step, paddings, and the 11906 cardinality of the field mapped to x-channel 11907 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 11908 ``rangeStep`` is ``null``, the width will be the value of `config.view.width 11909 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 11910 * If no field is mapped to ``x`` channel, the ``width`` will be the value of 11911 `config.scale.textXRangeStep 11912 <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for 11913 ``text`` mark and the value of ``rangeStep`` for other marks. 11914 11915 **Note:** For plots with `row and column channels 11916 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 11917 width of a single view. 11918 11919 **See also:** The documentation for `width and height 11920 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 11921 """ 11922 _schema = {'$ref': '#/definitions/FacetedUnitSpec'} 11923 11924 def __init__(self, mark=Undefined, align=Undefined, bounds=Undefined, center=Undefined, 11925 columns=Undefined, data=Undefined, description=Undefined, encoding=Undefined, 11926 height=Undefined, name=Undefined, projection=Undefined, resolve=Undefined, 11927 selection=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, 11928 view=Undefined, width=Undefined, **kwds): 11929 super(FacetedUnitSpec, self).__init__(mark=mark, align=align, bounds=bounds, center=center, 11930 columns=columns, data=data, description=description, 11931 encoding=encoding, height=height, name=name, 11932 projection=projection, resolve=resolve, 11933 selection=selection, spacing=spacing, title=title, 11934 transform=transform, view=view, width=width, **kwds) 11935 11936 11937class HConcatSpec(Spec): 11938 """HConcatSpec schema wrapper 11939 11940 Mapping(required=[hconcat]) 11941 Base interface for a horizontal concatenation specification. 11942 11943 Attributes 11944 ---------- 11945 11946 hconcat : List(:class:`Spec`) 11947 A list of views to be concatenated and put into a row. 11948 bounds : enum('full', 'flush') 11949 The bounds calculation method to use for determining the extent of a sub-plot. One 11950 of ``full`` (the default) or ``flush``. 11951 11952 11953 * If set to ``full``, the entire calculated bounds (including axes, title, and 11954 legend) will be used. 11955 * If set to ``flush``, only the specified width and height values for the sub-view 11956 will be used. The ``flush`` setting can be useful when attempting to place 11957 sub-plots without axes or legends into a uniform grid structure. 11958 11959 **Default value:** ``"full"`` 11960 center : boolean 11961 Boolean flag indicating if subviews should be centered relative to their respective 11962 rows or columns. 11963 11964 **Default value:** ``false`` 11965 data : anyOf(:class:`Data`, None) 11966 An object describing the data source. Set to ``null`` to ignore the parent's data 11967 source. If no data is set, it is derived from the parent. 11968 description : string 11969 Description of this mark for commenting purpose. 11970 name : string 11971 Name of the visualization for later reference. 11972 resolve : :class:`Resolve` 11973 Scale, axis, and legend resolutions for view composition specifications. 11974 spacing : float 11975 The spacing in pixels between sub-views of the concat operator. 11976 11977 **Default value** : ``10`` 11978 title : anyOf(string, :class:`TitleParams`) 11979 Title for the plot. 11980 transform : List(:class:`Transform`) 11981 An array of data transformations such as filter and new field calculation. 11982 """ 11983 _schema = {'$ref': '#/definitions/HConcatSpec'} 11984 11985 def __init__(self, hconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined, 11986 description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined, 11987 title=Undefined, transform=Undefined, **kwds): 11988 super(HConcatSpec, self).__init__(hconcat=hconcat, bounds=bounds, center=center, data=data, 11989 description=description, name=name, resolve=resolve, 11990 spacing=spacing, title=title, transform=transform, **kwds) 11991 11992 11993class LayerSpec(Spec): 11994 """LayerSpec schema wrapper 11995 11996 Mapping(required=[layer]) 11997 A full layered plot specification, which may contains ``encoding`` and ``projection`` 11998 properties that will be applied to underlying unit (single-view) specifications. 11999 12000 Attributes 12001 ---------- 12002 12003 layer : List(anyOf(:class:`LayerSpec`, :class:`UnitSpec`)) 12004 Layer or single view specifications to be layered. 12005 12006 **Note** : Specifications inside ``layer`` cannot use ``row`` and ``column`` 12007 channels as layering facet specifications is not allowed. Instead, use the `facet 12008 operator <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer 12009 inside a facet. 12010 data : anyOf(:class:`Data`, None) 12011 An object describing the data source. Set to ``null`` to ignore the parent's data 12012 source. If no data is set, it is derived from the parent. 12013 description : string 12014 Description of this mark for commenting purpose. 12015 encoding : :class:`Encoding` 12016 A shared key-value mapping between encoding channels and definition of fields in the 12017 underlying layers. 12018 height : float 12019 The height of a visualization. 12020 12021 **Default value:** 12022 12023 12024 * If a view's `autosize 12025 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 12026 its y-channel has a `continuous scale 12027 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will 12028 be the value of `config.view.height 12029 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 12030 * For y-axis with a band or point scale: if `rangeStep 12031 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 12032 unspecified, the height is `determined by the range step, paddings, and the 12033 cardinality of the field mapped to y-channel 12034 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 12035 ``rangeStep`` is ``null``, the height will be the value of `config.view.height 12036 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 12037 * If no field is mapped to ``y`` channel, the ``height`` will be the value of 12038 ``rangeStep``. 12039 12040 **Note** : For plots with `row and column channels 12041 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 12042 height of a single view. 12043 12044 **See also:** The documentation for `width and height 12045 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 12046 name : string 12047 Name of the visualization for later reference. 12048 projection : :class:`Projection` 12049 An object defining properties of the geographic projection shared by underlying 12050 layers. 12051 resolve : :class:`Resolve` 12052 Scale, axis, and legend resolutions for view composition specifications. 12053 title : anyOf(string, :class:`TitleParams`) 12054 Title for the plot. 12055 transform : List(:class:`Transform`) 12056 An array of data transformations such as filter and new field calculation. 12057 view : :class:`ViewBackground` 12058 An object defining the view background's fill and stroke. 12059 12060 **Default value:** none (transparent) 12061 width : float 12062 The width of a visualization. 12063 12064 **Default value:** This will be determined by the following rules: 12065 12066 12067 * If a view's `autosize 12068 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 12069 its x-channel has a `continuous scale 12070 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will 12071 be the value of `config.view.width 12072 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 12073 * For x-axis with a band or point scale: if `rangeStep 12074 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 12075 unspecified, the width is `determined by the range step, paddings, and the 12076 cardinality of the field mapped to x-channel 12077 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 12078 ``rangeStep`` is ``null``, the width will be the value of `config.view.width 12079 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 12080 * If no field is mapped to ``x`` channel, the ``width`` will be the value of 12081 `config.scale.textXRangeStep 12082 <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for 12083 ``text`` mark and the value of ``rangeStep`` for other marks. 12084 12085 **Note:** For plots with `row and column channels 12086 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 12087 width of a single view. 12088 12089 **See also:** The documentation for `width and height 12090 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 12091 """ 12092 _schema = {'$ref': '#/definitions/LayerSpec'} 12093 12094 def __init__(self, layer=Undefined, data=Undefined, description=Undefined, encoding=Undefined, 12095 height=Undefined, name=Undefined, projection=Undefined, resolve=Undefined, 12096 title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds): 12097 super(LayerSpec, self).__init__(layer=layer, data=data, description=description, 12098 encoding=encoding, height=height, name=name, 12099 projection=projection, resolve=resolve, title=title, 12100 transform=transform, view=view, width=width, **kwds) 12101 12102 12103class RepeatSpec(Spec): 12104 """RepeatSpec schema wrapper 12105 12106 Mapping(required=[repeat, spec]) 12107 Base interface for a repeat specification. 12108 12109 Attributes 12110 ---------- 12111 12112 repeat : anyOf(List(string), :class:`RepeatMapping`) 12113 Definition for fields to be repeated. One of: 12114 1) An array of fields to be repeated. If ``"repeat"`` is an array, the field can be 12115 referred using ``{"repeat": "repeat"}`` 12116 2) An object that mapped ``"row"`` and/or ``"column"`` to the listed of fields to be 12117 repeated along the particular orientations. The objects ``{"repeat": "row"}`` and 12118 ``{"repeat": "column"}`` can be used to refer to the repeated field respectively. 12119 spec : :class:`Spec` 12120 A specification of the view that gets repeated. 12121 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 12122 The alignment to apply to grid rows and columns. 12123 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 12124 12125 12126 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 12127 placed one after the other. 12128 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 12129 or column may be of variable size. 12130 * For ``"all"``, subviews will be aligned and each row or column will be sized 12131 identically based on the maximum observed size. String values for this property 12132 will be applied to both grid rows and columns. 12133 12134 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 12135 be used to supply different alignments for rows and columns. 12136 12137 **Default value:** ``"all"``. 12138 bounds : enum('full', 'flush') 12139 The bounds calculation method to use for determining the extent of a sub-plot. One 12140 of ``full`` (the default) or ``flush``. 12141 12142 12143 * If set to ``full``, the entire calculated bounds (including axes, title, and 12144 legend) will be used. 12145 * If set to ``flush``, only the specified width and height values for the sub-view 12146 will be used. The ``flush`` setting can be useful when attempting to place 12147 sub-plots without axes or legends into a uniform grid structure. 12148 12149 **Default value:** ``"full"`` 12150 center : anyOf(boolean, :class:`RowColboolean`) 12151 Boolean flag indicating if subviews should be centered relative to their respective 12152 rows or columns. 12153 12154 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 12155 supply different centering values for rows and columns. 12156 12157 **Default value:** ``false`` 12158 columns : float 12159 The number of columns to include in the view composition layout. 12160 12161 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 12162 will be assumed. This is equivalent to 12163 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 12164 ``repeat`` ). 12165 12166 **Note** : 12167 12168 1) This property is only for: 12169 12170 12171 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 12172 * the ``facet`` and ``repeat`` operator with one field/repetition definition 12173 (without row/column nesting) 12174 12175 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 12176 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 12177 data : anyOf(:class:`Data`, None) 12178 An object describing the data source. Set to ``null`` to ignore the parent's data 12179 source. If no data is set, it is derived from the parent. 12180 description : string 12181 Description of this mark for commenting purpose. 12182 name : string 12183 Name of the visualization for later reference. 12184 resolve : :class:`Resolve` 12185 Scale, axis, and legend resolutions for view composition specifications. 12186 spacing : anyOf(float, :class:`RowColnumber`) 12187 The spacing in pixels between sub-views of the composition operator. 12188 An object of the form ``{"row": number, "column": number}`` can be used to set 12189 different spacing values for rows and columns. 12190 12191 **Default value** : Depends on ``"spacing"`` property of `the view composition 12192 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 12193 ``20`` by default) 12194 title : anyOf(string, :class:`TitleParams`) 12195 Title for the plot. 12196 transform : List(:class:`Transform`) 12197 An array of data transformations such as filter and new field calculation. 12198 """ 12199 _schema = {'$ref': '#/definitions/RepeatSpec'} 12200 12201 def __init__(self, repeat=Undefined, spec=Undefined, align=Undefined, bounds=Undefined, 12202 center=Undefined, columns=Undefined, data=Undefined, description=Undefined, 12203 name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, 12204 transform=Undefined, **kwds): 12205 super(RepeatSpec, self).__init__(repeat=repeat, spec=spec, align=align, bounds=bounds, 12206 center=center, columns=columns, data=data, 12207 description=description, name=name, resolve=resolve, 12208 spacing=spacing, title=title, transform=transform, **kwds) 12209 12210 12211class SphereGenerator(Generator): 12212 """SphereGenerator schema wrapper 12213 12214 Mapping(required=[sphere]) 12215 12216 Attributes 12217 ---------- 12218 12219 sphere : anyOf(enum(True), Mapping(required=[])) 12220 Generate sphere GeoJSON data for the full globe. 12221 name : string 12222 Provide a placeholder name and bind data at runtime. 12223 """ 12224 _schema = {'$ref': '#/definitions/SphereGenerator'} 12225 12226 def __init__(self, sphere=Undefined, name=Undefined, **kwds): 12227 super(SphereGenerator, self).__init__(sphere=sphere, name=name, **kwds) 12228 12229 12230class StackOffset(VegaLiteSchema): 12231 """StackOffset schema wrapper 12232 12233 enum('zero', 'center', 'normalize') 12234 """ 12235 _schema = {'$ref': '#/definitions/StackOffset'} 12236 12237 def __init__(self, *args): 12238 super(StackOffset, self).__init__(*args) 12239 12240 12241class StandardType(VegaLiteSchema): 12242 """StandardType schema wrapper 12243 12244 enum('quantitative', 'ordinal', 'temporal', 'nominal') 12245 """ 12246 _schema = {'$ref': '#/definitions/StandardType'} 12247 12248 def __init__(self, *args): 12249 super(StandardType, self).__init__(*args) 12250 12251 12252class StringFieldDefWithCondition(VegaLiteSchema): 12253 """StringFieldDefWithCondition schema wrapper 12254 12255 Mapping(required=[type]) 12256 A FieldDef with Condition :raw-html:`<ValueDef>` 12257 12258 Attributes 12259 ---------- 12260 12261 type : :class:`StandardType` 12262 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 12263 ``"ordinal"``, or ``"nominal"`` ). 12264 It can also be a ``"geojson"`` type for encoding `'geoshape' 12265 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 12266 12267 **Note:** 12268 12269 12270 * Data values for a temporal field can be either a date-time string (e.g., 12271 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 12272 timestamp number (e.g., ``1552199579097`` ). 12273 * Data ``type`` describes the semantics of the data rather than the primitive data 12274 types ( ``number``, ``string``, etc.). The same primitive data type can have 12275 different types of measurement. For example, numeric data can represent 12276 quantitative, ordinal, or nominal data. 12277 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 12278 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 12279 or `"ordinal" (for using an ordinal bin scale) 12280 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 12281 * When using with `timeUnit 12282 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 12283 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 12284 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 12285 * When using with `aggregate 12286 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 12287 refers to the post-aggregation data type. For example, we can calculate count 12288 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 12289 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 12290 is ``"quantitative"``. 12291 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 12292 ``type`` as they have exactly the same type as their primary channels (e.g., 12293 ``x``, ``y`` ). 12294 12295 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 12296 documentation. 12297 aggregate : :class:`Aggregate` 12298 Aggregation function for the field 12299 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 12300 12301 **Default value:** ``undefined`` (None) 12302 12303 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 12304 documentation. 12305 bin : anyOf(boolean, :class:`BinParams`, None) 12306 A flag for binning a ``quantitative`` field, `an object defining binning parameters 12307 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 12308 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 12309 ``"binned"`` ). 12310 12311 12312 If ``true``, default `binning parameters 12313 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 12314 12315 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 12316 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 12317 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 12318 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 12319 set the axis's `tickMinStep 12320 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 12321 12322 **Default value:** ``false`` 12323 12324 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 12325 documentation. 12326 condition : anyOf(:class:`ConditionalStringValueDef`, 12327 List(:class:`ConditionalStringValueDef`)) 12328 One or more value definition(s) with `a selection or a test predicate 12329 <https://vega.github.io/vega-lite/docs/condition.html>`__. 12330 12331 **Note:** A field definition's ``condition`` property can only contain `conditional 12332 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 12333 since Vega-Lite only allows at most one encoded field per encoding channel. 12334 field : :class:`Field` 12335 **Required.** A string defining the name of the field from which to pull a data 12336 value 12337 or an object defining iterated values from the `repeat 12338 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 12339 12340 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 12341 documentation. 12342 12343 **Notes:** 12344 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 12345 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 12346 If field names contain dots or brackets but are not nested, you can use ``\\`` to 12347 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 12348 See more details about escaping in the `field documentation 12349 <https://vega.github.io/vega-lite/docs/field.html>`__. 12350 2) ``field`` is not required if ``aggregate`` is ``count``. 12351 legend : anyOf(:class:`Legend`, None) 12352 An object defining properties of the legend. 12353 If ``null``, the legend for the encoding channel will be removed. 12354 12355 **Default value:** If undefined, default `legend properties 12356 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 12357 12358 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 12359 documentation. 12360 scale : anyOf(:class:`Scale`, None) 12361 An object defining properties of the channel's scale, which is the function that 12362 transforms values in the data domain (numbers, dates, strings, etc) to visual values 12363 (pixels, colors, sizes) of the encoding channels. 12364 12365 If ``null``, the scale will be `disabled and the data value will be directly encoded 12366 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 12367 12368 **Default value:** If undefined, default `scale properties 12369 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 12370 12371 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 12372 documentation. 12373 sort : :class:`Sort` 12374 Sort order for the encoded field. 12375 12376 For continuous fields (quantitative or temporal), ``sort`` can be either 12377 ``"ascending"`` or ``"descending"``. 12378 12379 For discrete fields, ``sort`` can be one of the following: 12380 12381 12382 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 12383 Javascript. 12384 * `A sort-by-encoding definition 12385 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 12386 by another encoding channel. (This type of sort definition is not available for 12387 ``row`` and ``column`` channels.) 12388 * `A sort field definition 12389 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 12390 another field. 12391 * `An array specifying the field values in preferred order 12392 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 12393 sort order will obey the values in the array, followed by any unspecified values 12394 in their original order. For discrete time field, values in the sort array can be 12395 `date-time definition objects <types#datetime>`__. In addition, for time units 12396 ``"month"`` and ``"day"``, the values can be the month or day names (case 12397 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 12398 * ``null`` indicating no sort. 12399 12400 **Default value:** ``"ascending"`` 12401 12402 **Note:** ``null`` is not supported for ``row`` and ``column``. 12403 12404 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 12405 documentation. 12406 timeUnit : :class:`TimeUnit` 12407 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 12408 field. 12409 or `a temporal field that gets casted as ordinal 12410 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 12411 12412 **Default value:** ``undefined`` (None) 12413 12414 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 12415 documentation. 12416 title : anyOf(string, None) 12417 A title for the field. If ``null``, the title will be removed. 12418 12419 **Default value:** derived from the field's name and transformation function ( 12420 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 12421 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 12422 field is binned or has a time unit applied, the applied function is shown in 12423 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 12424 Otherwise, the title is simply the field name. 12425 12426 **Notes** : 12427 12428 1) You can customize the default field title format by providing the `fieldTitle 12429 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 12430 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 12431 function via the compile function's options 12432 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 12433 12434 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 12435 defined, axis/header/legend title will be used. 12436 """ 12437 _schema = {'$ref': '#/definitions/StringFieldDefWithCondition'} 12438 12439 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 12440 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 12441 title=Undefined, **kwds): 12442 super(StringFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin, 12443 condition=condition, field=field, 12444 legend=legend, scale=scale, sort=sort, 12445 timeUnit=timeUnit, title=title, **kwds) 12446 12447 12448class StringFieldDefWithConditionTypeForShape(VegaLiteSchema): 12449 """StringFieldDefWithConditionTypeForShape schema wrapper 12450 12451 Mapping(required=[type]) 12452 A FieldDef with Condition :raw-html:`<ValueDef>` 12453 12454 Attributes 12455 ---------- 12456 12457 type : :class:`TypeForShape` 12458 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 12459 ``"ordinal"``, or ``"nominal"`` ). 12460 It can also be a ``"geojson"`` type for encoding `'geoshape' 12461 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 12462 12463 **Note:** 12464 12465 12466 * Data values for a temporal field can be either a date-time string (e.g., 12467 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 12468 timestamp number (e.g., ``1552199579097`` ). 12469 * Data ``type`` describes the semantics of the data rather than the primitive data 12470 types ( ``number``, ``string``, etc.). The same primitive data type can have 12471 different types of measurement. For example, numeric data can represent 12472 quantitative, ordinal, or nominal data. 12473 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 12474 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 12475 or `"ordinal" (for using an ordinal bin scale) 12476 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 12477 * When using with `timeUnit 12478 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 12479 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 12480 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 12481 * When using with `aggregate 12482 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 12483 refers to the post-aggregation data type. For example, we can calculate count 12484 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 12485 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 12486 is ``"quantitative"``. 12487 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 12488 ``type`` as they have exactly the same type as their primary channels (e.g., 12489 ``x``, ``y`` ). 12490 12491 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 12492 documentation. 12493 aggregate : :class:`Aggregate` 12494 Aggregation function for the field 12495 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 12496 12497 **Default value:** ``undefined`` (None) 12498 12499 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 12500 documentation. 12501 bin : anyOf(boolean, :class:`BinParams`, None) 12502 A flag for binning a ``quantitative`` field, `an object defining binning parameters 12503 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 12504 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 12505 ``"binned"`` ). 12506 12507 12508 If ``true``, default `binning parameters 12509 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 12510 12511 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 12512 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 12513 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 12514 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 12515 set the axis's `tickMinStep 12516 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 12517 12518 **Default value:** ``false`` 12519 12520 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 12521 documentation. 12522 condition : anyOf(:class:`ConditionalStringValueDef`, 12523 List(:class:`ConditionalStringValueDef`)) 12524 One or more value definition(s) with `a selection or a test predicate 12525 <https://vega.github.io/vega-lite/docs/condition.html>`__. 12526 12527 **Note:** A field definition's ``condition`` property can only contain `conditional 12528 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 12529 since Vega-Lite only allows at most one encoded field per encoding channel. 12530 field : :class:`Field` 12531 **Required.** A string defining the name of the field from which to pull a data 12532 value 12533 or an object defining iterated values from the `repeat 12534 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 12535 12536 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 12537 documentation. 12538 12539 **Notes:** 12540 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 12541 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 12542 If field names contain dots or brackets but are not nested, you can use ``\\`` to 12543 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 12544 See more details about escaping in the `field documentation 12545 <https://vega.github.io/vega-lite/docs/field.html>`__. 12546 2) ``field`` is not required if ``aggregate`` is ``count``. 12547 legend : anyOf(:class:`Legend`, None) 12548 An object defining properties of the legend. 12549 If ``null``, the legend for the encoding channel will be removed. 12550 12551 **Default value:** If undefined, default `legend properties 12552 <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied. 12553 12554 **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__ 12555 documentation. 12556 scale : anyOf(:class:`Scale`, None) 12557 An object defining properties of the channel's scale, which is the function that 12558 transforms values in the data domain (numbers, dates, strings, etc) to visual values 12559 (pixels, colors, sizes) of the encoding channels. 12560 12561 If ``null``, the scale will be `disabled and the data value will be directly encoded 12562 <https://vega.github.io/vega-lite/docs/scale.html#disable>`__. 12563 12564 **Default value:** If undefined, default `scale properties 12565 <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied. 12566 12567 **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__ 12568 documentation. 12569 sort : :class:`Sort` 12570 Sort order for the encoded field. 12571 12572 For continuous fields (quantitative or temporal), ``sort`` can be either 12573 ``"ascending"`` or ``"descending"``. 12574 12575 For discrete fields, ``sort`` can be one of the following: 12576 12577 12578 * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in 12579 Javascript. 12580 * `A sort-by-encoding definition 12581 <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting 12582 by another encoding channel. (This type of sort definition is not available for 12583 ``row`` and ``column`` channels.) 12584 * `A sort field definition 12585 <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by 12586 another field. 12587 * `An array specifying the field values in preferred order 12588 <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the 12589 sort order will obey the values in the array, followed by any unspecified values 12590 in their original order. For discrete time field, values in the sort array can be 12591 `date-time definition objects <types#datetime>`__. In addition, for time units 12592 ``"month"`` and ``"day"``, the values can be the month or day names (case 12593 insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). 12594 * ``null`` indicating no sort. 12595 12596 **Default value:** ``"ascending"`` 12597 12598 **Note:** ``null`` is not supported for ``row`` and ``column``. 12599 12600 **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__ 12601 documentation. 12602 timeUnit : :class:`TimeUnit` 12603 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 12604 field. 12605 or `a temporal field that gets casted as ordinal 12606 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 12607 12608 **Default value:** ``undefined`` (None) 12609 12610 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 12611 documentation. 12612 title : anyOf(string, None) 12613 A title for the field. If ``null``, the title will be removed. 12614 12615 **Default value:** derived from the field's name and transformation function ( 12616 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 12617 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 12618 field is binned or has a time unit applied, the applied function is shown in 12619 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 12620 Otherwise, the title is simply the field name. 12621 12622 **Notes** : 12623 12624 1) You can customize the default field title format by providing the `fieldTitle 12625 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 12626 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 12627 function via the compile function's options 12628 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 12629 12630 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 12631 defined, axis/header/legend title will be used. 12632 """ 12633 _schema = {'$ref': '#/definitions/StringFieldDefWithCondition<TypeForShape>'} 12634 12635 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 12636 field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined, 12637 title=Undefined, **kwds): 12638 super(StringFieldDefWithConditionTypeForShape, self).__init__(type=type, aggregate=aggregate, 12639 bin=bin, condition=condition, 12640 field=field, legend=legend, 12641 scale=scale, sort=sort, 12642 timeUnit=timeUnit, title=title, 12643 **kwds) 12644 12645 12646class StringValueDefWithCondition(VegaLiteSchema): 12647 """StringValueDefWithCondition schema wrapper 12648 12649 Mapping(required=[]) 12650 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 12651 optional. 12652 12653 Attributes 12654 ---------- 12655 12656 condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`, 12657 List(:class:`ConditionalStringValueDef`)) 12658 A field definition or one or more value definition(s) with a selection predicate. 12659 value : anyOf(string, None) 12660 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 12661 between ``0`` to ``1`` for opacity). 12662 """ 12663 _schema = {'$ref': '#/definitions/StringValueDefWithCondition'} 12664 12665 def __init__(self, condition=Undefined, value=Undefined, **kwds): 12666 super(StringValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds) 12667 12668 12669class StringValueDefWithConditionTypeForShape(VegaLiteSchema): 12670 """StringValueDefWithConditionTypeForShape schema wrapper 12671 12672 Mapping(required=[]) 12673 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 12674 optional. 12675 12676 Attributes 12677 ---------- 12678 12679 condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`, 12680 :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`)) 12681 A field definition or one or more value definition(s) with a selection predicate. 12682 value : anyOf(string, None) 12683 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 12684 between ``0`` to ``1`` for opacity). 12685 """ 12686 _schema = {'$ref': '#/definitions/StringValueDefWithCondition<TypeForShape>'} 12687 12688 def __init__(self, condition=Undefined, value=Undefined, **kwds): 12689 super(StringValueDefWithConditionTypeForShape, self).__init__(condition=condition, value=value, 12690 **kwds) 12691 12692 12693class StrokeCap(VegaLiteSchema): 12694 """StrokeCap schema wrapper 12695 12696 enum('butt', 'round', 'square') 12697 """ 12698 _schema = {'$ref': '#/definitions/StrokeCap'} 12699 12700 def __init__(self, *args): 12701 super(StrokeCap, self).__init__(*args) 12702 12703 12704class StrokeJoin(VegaLiteSchema): 12705 """StrokeJoin schema wrapper 12706 12707 enum('miter', 'round', 'bevel') 12708 """ 12709 _schema = {'$ref': '#/definitions/StrokeJoin'} 12710 12711 def __init__(self, *args): 12712 super(StrokeJoin, self).__init__(*args) 12713 12714 12715class StyleConfigIndex(VegaLiteSchema): 12716 """StyleConfigIndex schema wrapper 12717 12718 Mapping(required=[]) 12719 """ 12720 _schema = {'$ref': '#/definitions/StyleConfigIndex'} 12721 12722 def __init__(self, **kwds): 12723 super(StyleConfigIndex, self).__init__(**kwds) 12724 12725 12726class SymbolShape(VegaLiteSchema): 12727 """SymbolShape schema wrapper 12728 12729 string 12730 """ 12731 _schema = {'$ref': '#/definitions/SymbolShape'} 12732 12733 def __init__(self, *args): 12734 super(SymbolShape, self).__init__(*args) 12735 12736 12737class TextBaseline(VegaLiteSchema): 12738 """TextBaseline schema wrapper 12739 12740 anyOf(enum('alphabetic'), :class:`Baseline`) 12741 """ 12742 _schema = {'$ref': '#/definitions/TextBaseline'} 12743 12744 def __init__(self, *args, **kwds): 12745 super(TextBaseline, self).__init__(*args, **kwds) 12746 12747 12748class Baseline(TextBaseline): 12749 """Baseline schema wrapper 12750 12751 enum('top', 'middle', 'bottom') 12752 """ 12753 _schema = {'$ref': '#/definitions/Baseline'} 12754 12755 def __init__(self, *args): 12756 super(Baseline, self).__init__(*args) 12757 12758 12759class TextConfig(VegaLiteSchema): 12760 """TextConfig schema wrapper 12761 12762 Mapping(required=[]) 12763 12764 Attributes 12765 ---------- 12766 12767 align : :class:`Align` 12768 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 12769 angle : float 12770 The rotation angle of the text, in degrees. 12771 baseline : :class:`TextBaseline` 12772 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 12773 12774 **Default value:** ``"middle"`` 12775 color : :class:`Color` 12776 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 12777 ``color`` and will override ``color``. 12778 12779 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 12780 ``"#4682b4"`` 12781 12782 **Note:** This property cannot be used in a `style config 12783 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 12784 cornerRadius : float 12785 The radius in pixels of rounded rectangle corners. 12786 12787 **Default value:** ``0`` 12788 cursor : :class:`Cursor` 12789 The mouse cursor used over the mark. Any valid `CSS cursor type 12790 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 12791 dir : :class:`Dir` 12792 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 12793 (right-to-left). This property determines on which side is truncated in response to 12794 the limit parameter. 12795 12796 **Default value:** ``"ltr"`` 12797 dx : float 12798 The horizontal offset, in pixels, between the text label and its anchor point. The 12799 offset is applied after rotation by the *angle* property. 12800 dy : float 12801 The vertical offset, in pixels, between the text label and its anchor point. The 12802 offset is applied after rotation by the *angle* property. 12803 ellipsis : string 12804 The ellipsis string for text truncated in response to the limit parameter. 12805 12806 **Default value:** ``"…"`` 12807 fill : :class:`Color` 12808 Default Fill Color. This has higher precedence than ``config.color`` 12809 12810 **Default value:** (None) 12811 fillOpacity : float 12812 The fill opacity (value between [0,1]). 12813 12814 **Default value:** ``1`` 12815 filled : boolean 12816 Whether the mark's color should be used as fill color instead of stroke color. 12817 12818 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 12819 ``true``. 12820 12821 **Note:** This property cannot be used in a `style config 12822 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 12823 font : string 12824 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 12825 fontSize : float 12826 The font size, in pixels. 12827 fontStyle : :class:`FontStyle` 12828 The font style (e.g., ``"italic"`` ). 12829 fontWeight : :class:`FontWeight` 12830 The font weight. 12831 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 12832 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 12833 ). 12834 height : float 12835 Height of the marks. 12836 href : string 12837 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 12838 interpolate : :class:`Interpolate` 12839 The line interpolation method to use for line and area marks. One of the following: 12840 12841 12842 * ``"linear"`` : piecewise linear segments, as in a polyline. 12843 * ``"linear-closed"`` : close the linear segments to form a polygon. 12844 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 12845 function. 12846 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 12847 step function. 12848 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 12849 step function. 12850 * ``"basis"`` : a B-spline, with control point duplication on the ends. 12851 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 12852 * ``"basis-closed"`` : a closed B-spline, as in a loop. 12853 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 12854 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 12855 but will intersect other control points. 12856 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 12857 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 12858 straighten the spline. 12859 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 12860 limit : float 12861 The maximum length of the text mark in pixels. The text value will be automatically 12862 truncated if the rendered size exceeds the limit. 12863 12864 **Default value:** ``0``, indicating no limit 12865 opacity : float 12866 The overall opacity (value between [0,1]). 12867 12868 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 12869 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 12870 order : anyOf(None, boolean) 12871 For line and trail marks, this ``order`` property can be set to ``null`` or 12872 ``false`` to make the lines use the original order in the data sources. 12873 orient : :class:`Orientation` 12874 The orientation of a non-stacked bar, tick, area, and line charts. 12875 The value is either horizontal (default) or vertical. 12876 12877 12878 * For bar, rule and tick, this determines whether the size of the bar and tick 12879 should be applied to x or y dimension. 12880 * For area, this property determines the orient property of the Vega output. 12881 * For line and trail marks, this property determines the sort order of the points in 12882 the line 12883 if ``config.sortLineBy`` is not specified. 12884 For stacked charts, this is always determined by the orientation of the stack; 12885 therefore explicitly specified value will be ignored. 12886 radius : float 12887 Polar coordinate radial offset, in pixels, of the text label from the origin 12888 determined by the ``x`` and ``y`` properties. 12889 shape : string 12890 Shape of the point marks. Supported values include: 12891 12892 12893 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 12894 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 12895 ``"triangle-left"``. 12896 * the line symbol ``"stroke"`` 12897 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 12898 * a custom `SVG path string 12899 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 12900 sizing, custom shape paths should be defined within a square bounding box with 12901 coordinates ranging from -1 to 1 along both the x and y dimensions.) 12902 12903 **Default value:** ``"circle"`` 12904 shortTimeLabels : boolean 12905 Whether month names and weekday names should be abbreviated. 12906 size : float 12907 Default size for marks. 12908 12909 12910 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 12911 marks. For example: in the case of circles, the radius is determined in part by 12912 the square root of the size value. 12913 * For ``bar``, this represents the band size of the bar, in pixels. 12914 * For ``text``, this represents the font size, in pixels. 12915 12916 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 12917 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 12918 ``11`` for text marks. 12919 stroke : :class:`Color` 12920 Default Stroke Color. This has higher precedence than ``config.color`` 12921 12922 **Default value:** (None) 12923 strokeCap : :class:`StrokeCap` 12924 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 12925 ``"square"``. 12926 12927 **Default value:** ``"square"`` 12928 strokeDash : List(float) 12929 An array of alternating stroke, space lengths for creating dashed or dotted lines. 12930 strokeDashOffset : float 12931 The offset (in pixels) into which to begin drawing with the stroke dash array. 12932 strokeJoin : :class:`StrokeJoin` 12933 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 12934 12935 **Default value:** ``"miter"`` 12936 strokeMiterLimit : float 12937 The miter limit at which to bevel a line join. 12938 strokeOpacity : float 12939 The stroke opacity (value between [0,1]). 12940 12941 **Default value:** ``1`` 12942 strokeWidth : float 12943 The stroke width, in pixels. 12944 tension : float 12945 Depending on the interpolation type, sets the tension parameter (for line and area 12946 marks). 12947 text : string 12948 Placeholder text if the ``text`` channel is not specified 12949 theta : float 12950 Polar coordinate angle, in radians, of the text label from the origin determined by 12951 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 12952 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 12953 radians, with ``0`` indicating "north". 12954 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 12955 The tooltip text string to show upon mouse hover or an object defining which fields 12956 should the tooltip be derived from. 12957 12958 12959 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 12960 will be used. 12961 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 12962 highlighted data point will be used. 12963 * If set to ``null``, then no tooltip will be used. 12964 width : float 12965 Width of the marks. 12966 x : anyOf(float, enum('width')) 12967 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 12968 specified ``x2`` or ``width``. 12969 12970 The ``value`` of this channel can be a number or a string ``"width"`` for the width 12971 of the plot. 12972 x2 : anyOf(float, enum('width')) 12973 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 12974 12975 The ``value`` of this channel can be a number or a string ``"width"`` for the width 12976 of the plot. 12977 y : anyOf(float, enum('height')) 12978 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 12979 specified ``y2`` or ``height``. 12980 12981 The ``value`` of this channel can be a number or a string ``"height"`` for the 12982 height of the plot. 12983 y2 : anyOf(float, enum('width')) 12984 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 12985 12986 The ``value`` of this channel can be a number or a string ``"height"`` for the 12987 height of the plot. 12988 """ 12989 _schema = {'$ref': '#/definitions/TextConfig'} 12990 12991 def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, 12992 cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, 12993 ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, 12994 font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, 12995 height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined, 12996 opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, 12997 shape=Undefined, shortTimeLabels=Undefined, size=Undefined, stroke=Undefined, 12998 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 12999 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 13000 strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, 13001 tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, 13002 y2=Undefined, **kwds): 13003 super(TextConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color, 13004 cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, 13005 dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, 13006 filled=filled, font=font, fontSize=fontSize, 13007 fontStyle=fontStyle, fontWeight=fontWeight, height=height, 13008 href=href, interpolate=interpolate, limit=limit, 13009 opacity=opacity, order=order, orient=orient, radius=radius, 13010 shape=shape, shortTimeLabels=shortTimeLabels, size=size, 13011 stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, 13012 strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin, 13013 strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity, 13014 strokeWidth=strokeWidth, tension=tension, text=text, 13015 theta=theta, tooltip=tooltip, width=width, x=x, x2=x2, y=y, 13016 y2=y2, **kwds) 13017 13018 13019class TextFieldDef(VegaLiteSchema): 13020 """TextFieldDef schema wrapper 13021 13022 Mapping(required=[type]) 13023 13024 Attributes 13025 ---------- 13026 13027 type : :class:`StandardType` 13028 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 13029 ``"ordinal"``, or ``"nominal"`` ). 13030 It can also be a ``"geojson"`` type for encoding `'geoshape' 13031 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 13032 13033 **Note:** 13034 13035 13036 * Data values for a temporal field can be either a date-time string (e.g., 13037 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 13038 timestamp number (e.g., ``1552199579097`` ). 13039 * Data ``type`` describes the semantics of the data rather than the primitive data 13040 types ( ``number``, ``string``, etc.). The same primitive data type can have 13041 different types of measurement. For example, numeric data can represent 13042 quantitative, ordinal, or nominal data. 13043 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 13044 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 13045 or `"ordinal" (for using an ordinal bin scale) 13046 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 13047 * When using with `timeUnit 13048 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 13049 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 13050 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 13051 * When using with `aggregate 13052 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 13053 refers to the post-aggregation data type. For example, we can calculate count 13054 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 13055 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 13056 is ``"quantitative"``. 13057 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 13058 ``type`` as they have exactly the same type as their primary channels (e.g., 13059 ``x``, ``y`` ). 13060 13061 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 13062 documentation. 13063 aggregate : :class:`Aggregate` 13064 Aggregation function for the field 13065 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 13066 13067 **Default value:** ``undefined`` (None) 13068 13069 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 13070 documentation. 13071 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 13072 A flag for binning a ``quantitative`` field, `an object defining binning parameters 13073 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 13074 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 13075 ``"binned"`` ). 13076 13077 13078 If ``true``, default `binning parameters 13079 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 13080 13081 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 13082 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 13083 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 13084 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 13085 set the axis's `tickMinStep 13086 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 13087 13088 **Default value:** ``false`` 13089 13090 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 13091 documentation. 13092 field : :class:`Field` 13093 **Required.** A string defining the name of the field from which to pull a data 13094 value 13095 or an object defining iterated values from the `repeat 13096 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 13097 13098 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 13099 documentation. 13100 13101 **Notes:** 13102 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 13103 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 13104 If field names contain dots or brackets but are not nested, you can use ``\\`` to 13105 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 13106 See more details about escaping in the `field documentation 13107 <https://vega.github.io/vega-lite/docs/field.html>`__. 13108 2) ``field`` is not required if ``aggregate`` is ``count``. 13109 format : string 13110 The text formatting pattern for labels of guides (axes, legends, headers) and text 13111 marks. 13112 13113 13114 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 13115 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 13116 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 13117 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 13118 13119 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 13120 for more examples. 13121 13122 **Default value:** Derived from `numberFormat 13123 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 13124 format and from `timeFormat 13125 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 13126 format. 13127 formatType : enum('number', 'time') 13128 The format type for labels ( ``"number"`` or ``"time"`` ). 13129 13130 **Default value:** 13131 13132 13133 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 13134 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 13135 ``timeUnit``. 13136 timeUnit : :class:`TimeUnit` 13137 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 13138 field. 13139 or `a temporal field that gets casted as ordinal 13140 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 13141 13142 **Default value:** ``undefined`` (None) 13143 13144 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 13145 documentation. 13146 title : anyOf(string, None) 13147 A title for the field. If ``null``, the title will be removed. 13148 13149 **Default value:** derived from the field's name and transformation function ( 13150 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 13151 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 13152 field is binned or has a time unit applied, the applied function is shown in 13153 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 13154 Otherwise, the title is simply the field name. 13155 13156 **Notes** : 13157 13158 1) You can customize the default field title format by providing the `fieldTitle 13159 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 13160 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 13161 function via the compile function's options 13162 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 13163 13164 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 13165 defined, axis/header/legend title will be used. 13166 """ 13167 _schema = {'$ref': '#/definitions/TextFieldDef'} 13168 13169 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined, 13170 format=Undefined, formatType=Undefined, timeUnit=Undefined, title=Undefined, **kwds): 13171 super(TextFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field, 13172 format=format, formatType=formatType, timeUnit=timeUnit, 13173 title=title, **kwds) 13174 13175 13176class TextFieldDefWithCondition(VegaLiteSchema): 13177 """TextFieldDefWithCondition schema wrapper 13178 13179 Mapping(required=[type]) 13180 A FieldDef with Condition :raw-html:`<ValueDef>` 13181 13182 Attributes 13183 ---------- 13184 13185 type : :class:`StandardType` 13186 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 13187 ``"ordinal"``, or ``"nominal"`` ). 13188 It can also be a ``"geojson"`` type for encoding `'geoshape' 13189 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 13190 13191 **Note:** 13192 13193 13194 * Data values for a temporal field can be either a date-time string (e.g., 13195 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 13196 timestamp number (e.g., ``1552199579097`` ). 13197 * Data ``type`` describes the semantics of the data rather than the primitive data 13198 types ( ``number``, ``string``, etc.). The same primitive data type can have 13199 different types of measurement. For example, numeric data can represent 13200 quantitative, ordinal, or nominal data. 13201 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 13202 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 13203 or `"ordinal" (for using an ordinal bin scale) 13204 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 13205 * When using with `timeUnit 13206 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 13207 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 13208 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 13209 * When using with `aggregate 13210 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 13211 refers to the post-aggregation data type. For example, we can calculate count 13212 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 13213 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 13214 is ``"quantitative"``. 13215 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 13216 ``type`` as they have exactly the same type as their primary channels (e.g., 13217 ``x``, ``y`` ). 13218 13219 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 13220 documentation. 13221 aggregate : :class:`Aggregate` 13222 Aggregation function for the field 13223 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 13224 13225 **Default value:** ``undefined`` (None) 13226 13227 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 13228 documentation. 13229 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 13230 A flag for binning a ``quantitative`` field, `an object defining binning parameters 13231 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 13232 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 13233 ``"binned"`` ). 13234 13235 13236 If ``true``, default `binning parameters 13237 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 13238 13239 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 13240 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 13241 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 13242 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 13243 set the axis's `tickMinStep 13244 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 13245 13246 **Default value:** ``false`` 13247 13248 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 13249 documentation. 13250 condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`)) 13251 One or more value definition(s) with `a selection or a test predicate 13252 <https://vega.github.io/vega-lite/docs/condition.html>`__. 13253 13254 **Note:** A field definition's ``condition`` property can only contain `conditional 13255 value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__ 13256 since Vega-Lite only allows at most one encoded field per encoding channel. 13257 field : :class:`Field` 13258 **Required.** A string defining the name of the field from which to pull a data 13259 value 13260 or an object defining iterated values from the `repeat 13261 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 13262 13263 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 13264 documentation. 13265 13266 **Notes:** 13267 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 13268 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 13269 If field names contain dots or brackets but are not nested, you can use ``\\`` to 13270 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 13271 See more details about escaping in the `field documentation 13272 <https://vega.github.io/vega-lite/docs/field.html>`__. 13273 2) ``field`` is not required if ``aggregate`` is ``count``. 13274 format : string 13275 The text formatting pattern for labels of guides (axes, legends, headers) and text 13276 marks. 13277 13278 13279 * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's 13280 `number format pattern <https://github.com/d3/d3-format#locale_format>`__. 13281 * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time 13282 format pattern <https://github.com/d3/d3-time-format#locale_format>`__. 13283 13284 See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__ 13285 for more examples. 13286 13287 **Default value:** Derived from `numberFormat 13288 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number 13289 format and from `timeFormat 13290 <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time 13291 format. 13292 formatType : enum('number', 'time') 13293 The format type for labels ( ``"number"`` or ``"time"`` ). 13294 13295 **Default value:** 13296 13297 13298 * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``. 13299 * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without 13300 ``timeUnit``. 13301 timeUnit : :class:`TimeUnit` 13302 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 13303 field. 13304 or `a temporal field that gets casted as ordinal 13305 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 13306 13307 **Default value:** ``undefined`` (None) 13308 13309 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 13310 documentation. 13311 title : anyOf(string, None) 13312 A title for the field. If ``null``, the title will be removed. 13313 13314 **Default value:** derived from the field's name and transformation function ( 13315 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 13316 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 13317 field is binned or has a time unit applied, the applied function is shown in 13318 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 13319 Otherwise, the title is simply the field name. 13320 13321 **Notes** : 13322 13323 1) You can customize the default field title format by providing the `fieldTitle 13324 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 13325 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 13326 function via the compile function's options 13327 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 13328 13329 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 13330 defined, axis/header/legend title will be used. 13331 """ 13332 _schema = {'$ref': '#/definitions/TextFieldDefWithCondition'} 13333 13334 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined, 13335 field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined, 13336 title=Undefined, **kwds): 13337 super(TextFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin, 13338 condition=condition, field=field, format=format, 13339 formatType=formatType, timeUnit=timeUnit, 13340 title=title, **kwds) 13341 13342 13343class TextValueDefWithCondition(VegaLiteSchema): 13344 """TextValueDefWithCondition schema wrapper 13345 13346 Mapping(required=[]) 13347 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 13348 optional. 13349 13350 Attributes 13351 ---------- 13352 13353 condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`, 13354 List(:class:`ConditionalValueDef`)) 13355 A field definition or one or more value definition(s) with a selection predicate. 13356 value : :class:`Value` 13357 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 13358 between ``0`` to ``1`` for opacity). 13359 """ 13360 _schema = {'$ref': '#/definitions/TextValueDefWithCondition'} 13361 13362 def __init__(self, condition=Undefined, value=Undefined, **kwds): 13363 super(TextValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds) 13364 13365 13366class TickConfig(VegaLiteSchema): 13367 """TickConfig schema wrapper 13368 13369 Mapping(required=[]) 13370 13371 Attributes 13372 ---------- 13373 13374 align : :class:`Align` 13375 The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``. 13376 angle : float 13377 The rotation angle of the text, in degrees. 13378 bandSize : float 13379 The width of the ticks. 13380 13381 **Default value:** 3/4 of rangeStep. 13382 baseline : :class:`TextBaseline` 13383 The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``. 13384 13385 **Default value:** ``"middle"`` 13386 color : :class:`Color` 13387 Default color. Note that ``fill`` and ``stroke`` have higher precedence than 13388 ``color`` and will override ``color``. 13389 13390 **Default value:** :raw-html:`<span style="color: #4682b4;">■</span>` 13391 ``"#4682b4"`` 13392 13393 **Note:** This property cannot be used in a `style config 13394 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 13395 cornerRadius : float 13396 The radius in pixels of rounded rectangle corners. 13397 13398 **Default value:** ``0`` 13399 cursor : :class:`Cursor` 13400 The mouse cursor used over the mark. Any valid `CSS cursor type 13401 <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used. 13402 dir : :class:`Dir` 13403 The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` 13404 (right-to-left). This property determines on which side is truncated in response to 13405 the limit parameter. 13406 13407 **Default value:** ``"ltr"`` 13408 dx : float 13409 The horizontal offset, in pixels, between the text label and its anchor point. The 13410 offset is applied after rotation by the *angle* property. 13411 dy : float 13412 The vertical offset, in pixels, between the text label and its anchor point. The 13413 offset is applied after rotation by the *angle* property. 13414 ellipsis : string 13415 The ellipsis string for text truncated in response to the limit parameter. 13416 13417 **Default value:** ``"…"`` 13418 fill : :class:`Color` 13419 Default Fill Color. This has higher precedence than ``config.color`` 13420 13421 **Default value:** (None) 13422 fillOpacity : float 13423 The fill opacity (value between [0,1]). 13424 13425 **Default value:** ``1`` 13426 filled : boolean 13427 Whether the mark's color should be used as fill color instead of stroke color. 13428 13429 **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise, 13430 ``true``. 13431 13432 **Note:** This property cannot be used in a `style config 13433 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. 13434 font : string 13435 The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). 13436 fontSize : float 13437 The font size, in pixels. 13438 fontStyle : :class:`FontStyle` 13439 The font style (e.g., ``"italic"`` ). 13440 fontWeight : :class:`FontWeight` 13441 The font weight. 13442 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 13443 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 13444 ). 13445 height : float 13446 Height of the marks. 13447 href : string 13448 A URL to load upon mouse click. If defined, the mark acts as a hyperlink. 13449 interpolate : :class:`Interpolate` 13450 The line interpolation method to use for line and area marks. One of the following: 13451 13452 13453 * ``"linear"`` : piecewise linear segments, as in a polyline. 13454 * ``"linear-closed"`` : close the linear segments to form a polygon. 13455 * ``"step"`` : alternate between horizontal and vertical segments, as in a step 13456 function. 13457 * ``"step-before"`` : alternate between vertical and horizontal segments, as in a 13458 step function. 13459 * ``"step-after"`` : alternate between horizontal and vertical segments, as in a 13460 step function. 13461 * ``"basis"`` : a B-spline, with control point duplication on the ends. 13462 * ``"basis-open"`` : an open B-spline; may not intersect the start or end. 13463 * ``"basis-closed"`` : a closed B-spline, as in a loop. 13464 * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends. 13465 * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end, 13466 but will intersect other control points. 13467 * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop. 13468 * ``"bundle"`` : equivalent to basis, except the tension parameter is used to 13469 straighten the spline. 13470 * ``"monotone"`` : cubic interpolation that preserves monotonicity in y. 13471 limit : float 13472 The maximum length of the text mark in pixels. The text value will be automatically 13473 truncated if the rendered size exceeds the limit. 13474 13475 **Default value:** ``0``, indicating no limit 13476 opacity : float 13477 The overall opacity (value between [0,1]). 13478 13479 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 13480 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 13481 order : anyOf(None, boolean) 13482 For line and trail marks, this ``order`` property can be set to ``null`` or 13483 ``false`` to make the lines use the original order in the data sources. 13484 orient : :class:`Orientation` 13485 The orientation of a non-stacked bar, tick, area, and line charts. 13486 The value is either horizontal (default) or vertical. 13487 13488 13489 * For bar, rule and tick, this determines whether the size of the bar and tick 13490 should be applied to x or y dimension. 13491 * For area, this property determines the orient property of the Vega output. 13492 * For line and trail marks, this property determines the sort order of the points in 13493 the line 13494 if ``config.sortLineBy`` is not specified. 13495 For stacked charts, this is always determined by the orientation of the stack; 13496 therefore explicitly specified value will be ignored. 13497 radius : float 13498 Polar coordinate radial offset, in pixels, of the text label from the origin 13499 determined by the ``x`` and ``y`` properties. 13500 shape : string 13501 Shape of the point marks. Supported values include: 13502 13503 13504 * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, 13505 ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or 13506 ``"triangle-left"``. 13507 * the line symbol ``"stroke"`` 13508 * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` 13509 * a custom `SVG path string 13510 <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct 13511 sizing, custom shape paths should be defined within a square bounding box with 13512 coordinates ranging from -1 to 1 along both the x and y dimensions.) 13513 13514 **Default value:** ``"circle"`` 13515 size : float 13516 Default size for marks. 13517 13518 13519 * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the 13520 marks. For example: in the case of circles, the radius is determined in part by 13521 the square root of the size value. 13522 * For ``bar``, this represents the band size of the bar, in pixels. 13523 * For ``text``, this represents the font size, in pixels. 13524 13525 **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar 13526 marks with discrete dimensions; ``5`` for bar marks with continuous dimensions; 13527 ``11`` for text marks. 13528 stroke : :class:`Color` 13529 Default Stroke Color. This has higher precedence than ``config.color`` 13530 13531 **Default value:** (None) 13532 strokeCap : :class:`StrokeCap` 13533 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 13534 ``"square"``. 13535 13536 **Default value:** ``"square"`` 13537 strokeDash : List(float) 13538 An array of alternating stroke, space lengths for creating dashed or dotted lines. 13539 strokeDashOffset : float 13540 The offset (in pixels) into which to begin drawing with the stroke dash array. 13541 strokeJoin : :class:`StrokeJoin` 13542 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 13543 13544 **Default value:** ``"miter"`` 13545 strokeMiterLimit : float 13546 The miter limit at which to bevel a line join. 13547 strokeOpacity : float 13548 The stroke opacity (value between [0,1]). 13549 13550 **Default value:** ``1`` 13551 strokeWidth : float 13552 The stroke width, in pixels. 13553 tension : float 13554 Depending on the interpolation type, sets the tension parameter (for line and area 13555 marks). 13556 text : string 13557 Placeholder text if the ``text`` channel is not specified 13558 theta : float 13559 Polar coordinate angle, in radians, of the text label from the origin determined by 13560 the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of 13561 ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in 13562 radians, with ``0`` indicating "north". 13563 thickness : float 13564 Thickness of the tick mark. 13565 13566 **Default value:** ``1`` 13567 tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None) 13568 The tooltip text string to show upon mouse hover or an object defining which fields 13569 should the tooltip be derived from. 13570 13571 13572 * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding`` 13573 will be used. 13574 * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the 13575 highlighted data point will be used. 13576 * If set to ``null``, then no tooltip will be used. 13577 width : float 13578 Width of the marks. 13579 x : anyOf(float, enum('width')) 13580 X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without 13581 specified ``x2`` or ``width``. 13582 13583 The ``value`` of this channel can be a number or a string ``"width"`` for the width 13584 of the plot. 13585 x2 : anyOf(float, enum('width')) 13586 X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 13587 13588 The ``value`` of this channel can be a number or a string ``"width"`` for the width 13589 of the plot. 13590 y : anyOf(float, enum('height')) 13591 Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without 13592 specified ``y2`` or ``height``. 13593 13594 The ``value`` of this channel can be a number or a string ``"height"`` for the 13595 height of the plot. 13596 y2 : anyOf(float, enum('width')) 13597 Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. 13598 13599 The ``value`` of this channel can be a number or a string ``"height"`` for the 13600 height of the plot. 13601 """ 13602 _schema = {'$ref': '#/definitions/TickConfig'} 13603 13604 def __init__(self, align=Undefined, angle=Undefined, bandSize=Undefined, baseline=Undefined, 13605 color=Undefined, cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, 13606 dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, 13607 filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, 13608 fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, 13609 limit=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, 13610 radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, 13611 strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, 13612 strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, 13613 strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, 13614 thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, 13615 y=Undefined, y2=Undefined, **kwds): 13616 super(TickConfig, self).__init__(align=align, angle=angle, bandSize=bandSize, baseline=baseline, 13617 color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, 13618 dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, 13619 fillOpacity=fillOpacity, filled=filled, font=font, 13620 fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, 13621 height=height, href=href, interpolate=interpolate, limit=limit, 13622 opacity=opacity, order=order, orient=orient, radius=radius, 13623 shape=shape, size=size, stroke=stroke, strokeCap=strokeCap, 13624 strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, 13625 strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit, 13626 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 13627 tension=tension, text=text, theta=theta, thickness=thickness, 13628 tooltip=tooltip, width=width, x=x, x2=x2, y=y, y2=y2, **kwds) 13629 13630 13631class TimeUnit(VegaLiteSchema): 13632 """TimeUnit schema wrapper 13633 13634 anyOf(:class:`SingleTimeUnit`, :class:`MultiTimeUnit`) 13635 """ 13636 _schema = {'$ref': '#/definitions/TimeUnit'} 13637 13638 def __init__(self, *args, **kwds): 13639 super(TimeUnit, self).__init__(*args, **kwds) 13640 13641 13642class MultiTimeUnit(TimeUnit): 13643 """MultiTimeUnit schema wrapper 13644 13645 anyOf(:class:`LocalMultiTimeUnit`, :class:`UtcMultiTimeUnit`) 13646 """ 13647 _schema = {'$ref': '#/definitions/MultiTimeUnit'} 13648 13649 def __init__(self, *args, **kwds): 13650 super(MultiTimeUnit, self).__init__(*args, **kwds) 13651 13652 13653class LocalMultiTimeUnit(MultiTimeUnit): 13654 """LocalMultiTimeUnit schema wrapper 13655 13656 enum('yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 13657 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'quartermonth', 13658 'monthdate', 'monthdatehours', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 13659 'secondsmilliseconds') 13660 """ 13661 _schema = {'$ref': '#/definitions/LocalMultiTimeUnit'} 13662 13663 def __init__(self, *args): 13664 super(LocalMultiTimeUnit, self).__init__(*args) 13665 13666 13667class SingleTimeUnit(TimeUnit): 13668 """SingleTimeUnit schema wrapper 13669 13670 anyOf(:class:`LocalSingleTimeUnit`, :class:`UtcSingleTimeUnit`) 13671 """ 13672 _schema = {'$ref': '#/definitions/SingleTimeUnit'} 13673 13674 def __init__(self, *args, **kwds): 13675 super(SingleTimeUnit, self).__init__(*args, **kwds) 13676 13677 13678class LocalSingleTimeUnit(SingleTimeUnit): 13679 """LocalSingleTimeUnit schema wrapper 13680 13681 enum('year', 'quarter', 'month', 'day', 'date', 'hours', 'minutes', 'seconds', 13682 'milliseconds') 13683 """ 13684 _schema = {'$ref': '#/definitions/LocalSingleTimeUnit'} 13685 13686 def __init__(self, *args): 13687 super(LocalSingleTimeUnit, self).__init__(*args) 13688 13689 13690class TitleAnchor(VegaLiteSchema): 13691 """TitleAnchor schema wrapper 13692 13693 enum(None, 'start', 'middle', 'end') 13694 """ 13695 _schema = {'$ref': '#/definitions/TitleAnchor'} 13696 13697 def __init__(self, *args): 13698 super(TitleAnchor, self).__init__(*args) 13699 13700 13701class TitleConfig(VegaLiteSchema): 13702 """TitleConfig schema wrapper 13703 13704 Mapping(required=[]) 13705 13706 Attributes 13707 ---------- 13708 13709 align : :class:`Align` 13710 13711 anchor : :class:`TitleAnchor` 13712 The anchor position for placing the title. One of ``"start"``, ``"middle"``, or 13713 ``"end"``. For example, with an orientation of top these anchor positions map to a 13714 left-, center-, or right-aligned title. 13715 angle : float 13716 Angle in degrees of title text. 13717 baseline : :class:`TextBaseline` 13718 Vertical text baseline for title text. One of ``"top"``, ``"middle"``, ``"bottom"``, 13719 or ``"alphabetic"``. 13720 color : :class:`Color` 13721 Text color for title text. 13722 dx : float 13723 Delta offset for title text x-coordinate. 13724 dy : float 13725 Delta offset for title text y-coordinate. 13726 font : string 13727 Font name for title text. 13728 fontSize : float 13729 Font size in pixels for title text. 13730 13731 **Default value:** ``10``. 13732 fontStyle : :class:`FontStyle` 13733 Font style for title text. 13734 fontWeight : :class:`FontWeight` 13735 Font weight for title text. 13736 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 13737 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 13738 ). 13739 frame : :class:`TitleFrame` 13740 The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative 13741 to the full bounding box) or ``"group"`` (to anchor relative to the group width or 13742 height). 13743 limit : float 13744 The maximum allowed length in pixels of legend labels. 13745 offset : float 13746 The orthogonal offset in pixels by which to displace the title from its position 13747 along the edge of the chart. 13748 orient : :class:`TitleOrient` 13749 Default title orientation ( ``"top"``, ``"bottom"``, ``"left"``, or ``"right"`` ) 13750 """ 13751 _schema = {'$ref': '#/definitions/TitleConfig'} 13752 13753 def __init__(self, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined, 13754 color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined, 13755 fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, limit=Undefined, 13756 offset=Undefined, orient=Undefined, **kwds): 13757 super(TitleConfig, self).__init__(align=align, anchor=anchor, angle=angle, baseline=baseline, 13758 color=color, dx=dx, dy=dy, font=font, fontSize=fontSize, 13759 fontStyle=fontStyle, fontWeight=fontWeight, frame=frame, 13760 limit=limit, offset=offset, orient=orient, **kwds) 13761 13762 13763class TitleFrame(VegaLiteSchema): 13764 """TitleFrame schema wrapper 13765 13766 enum('bounds', 'group') 13767 """ 13768 _schema = {'$ref': '#/definitions/TitleFrame'} 13769 13770 def __init__(self, *args): 13771 super(TitleFrame, self).__init__(*args) 13772 13773 13774class TitleOrient(VegaLiteSchema): 13775 """TitleOrient schema wrapper 13776 13777 enum('none', 'left', 'right', 'top', 'bottom') 13778 """ 13779 _schema = {'$ref': '#/definitions/TitleOrient'} 13780 13781 def __init__(self, *args): 13782 super(TitleOrient, self).__init__(*args) 13783 13784 13785class TitleParams(VegaLiteSchema): 13786 """TitleParams schema wrapper 13787 13788 Mapping(required=[text]) 13789 13790 Attributes 13791 ---------- 13792 13793 text : string 13794 The title text. 13795 align : :class:`Align` 13796 13797 anchor : :class:`TitleAnchor` 13798 The anchor position for placing the title. One of ``"start"``, ``"middle"``, or 13799 ``"end"``. For example, with an orientation of top these anchor positions map to a 13800 left-, center-, or right-aligned title. 13801 13802 **Default value:** ``"middle"`` for `single 13803 <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered 13804 <https://vega.github.io/vega-lite/docs/layer.html>`__ views. 13805 ``"start"`` for other composite views. 13806 13807 **Note:** `For now <https://github.com/vega/vega-lite/issues/2875>`__, ``anchor`` is 13808 only customizable only for `single 13809 <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered 13810 <https://vega.github.io/vega-lite/docs/layer.html>`__ views. For other composite 13811 views, ``anchor`` is always ``"start"``. 13812 angle : float 13813 Angle in degrees of title text. 13814 baseline : :class:`TextBaseline` 13815 Vertical text baseline for title text. One of ``"top"``, ``"middle"``, ``"bottom"``, 13816 or ``"alphabetic"``. 13817 color : :class:`Color` 13818 Text color for title text. 13819 dx : float 13820 Delta offset for title text x-coordinate. 13821 dy : float 13822 Delta offset for title text y-coordinate. 13823 font : string 13824 Font name for title text. 13825 fontSize : float 13826 Font size in pixels for title text. 13827 13828 **Default value:** ``10``. 13829 fontStyle : :class:`FontStyle` 13830 Font style for title text. 13831 fontWeight : :class:`FontWeight` 13832 Font weight for title text. 13833 This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``, 13834 ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700`` 13835 ). 13836 frame : :class:`TitleFrame` 13837 The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative 13838 to the full bounding box) or ``"group"`` (to anchor relative to the group width or 13839 height). 13840 limit : float 13841 The maximum allowed length in pixels of legend labels. 13842 offset : float 13843 The orthogonal offset in pixels by which to displace the title from its position 13844 along the edge of the chart. 13845 orient : :class:`TitleOrient` 13846 Default title orientation ( ``"top"``, ``"bottom"``, ``"left"``, or ``"right"`` ) 13847 style : anyOf(string, List(string)) 13848 A `mark style property <https://vega.github.io/vega-lite/docs/config.html#style>`__ 13849 to apply to the title text mark. 13850 13851 **Default value:** ``"group-title"``. 13852 zindex : float 13853 The integer z-index indicating the layering of the title group relative to other 13854 axis, mark and legend groups. 13855 13856 **Default value:** ``0``. 13857 """ 13858 _schema = {'$ref': '#/definitions/TitleParams'} 13859 13860 def __init__(self, text=Undefined, align=Undefined, anchor=Undefined, angle=Undefined, 13861 baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, 13862 fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, 13863 limit=Undefined, offset=Undefined, orient=Undefined, style=Undefined, zindex=Undefined, 13864 **kwds): 13865 super(TitleParams, self).__init__(text=text, align=align, anchor=anchor, angle=angle, 13866 baseline=baseline, color=color, dx=dx, dy=dy, font=font, 13867 fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, 13868 frame=frame, limit=limit, offset=offset, orient=orient, 13869 style=style, zindex=zindex, **kwds) 13870 13871 13872class TooltipContent(VegaLiteSchema): 13873 """TooltipContent schema wrapper 13874 13875 Mapping(required=[content]) 13876 13877 Attributes 13878 ---------- 13879 13880 content : enum('encoding', 'data') 13881 13882 """ 13883 _schema = {'$ref': '#/definitions/TooltipContent'} 13884 13885 def __init__(self, content=Undefined, **kwds): 13886 super(TooltipContent, self).__init__(content=content, **kwds) 13887 13888 13889class TopLevelSpec(VegaLiteSchema): 13890 """TopLevelSpec schema wrapper 13891 13892 anyOf(:class:`TopLevelUnitSpec`, :class:`TopLevelFacetSpec`, :class:`TopLevelLayerSpec`, 13893 :class:`TopLevelRepeatSpec`, :class:`TopLevelConcatSpec`, :class:`TopLevelVConcatSpec`, 13894 :class:`TopLevelHConcatSpec`) 13895 A Vega-Lite top-level specification. 13896 This is the root class for all Vega-Lite specifications. 13897 (The json schema is generated from this type.) 13898 """ 13899 _schema = {'$ref': '#/definitions/TopLevelSpec'} 13900 13901 def __init__(self, *args, **kwds): 13902 super(TopLevelSpec, self).__init__(*args, **kwds) 13903 13904 13905class TopLevelConcatSpec(TopLevelSpec): 13906 """TopLevelConcatSpec schema wrapper 13907 13908 Mapping(required=[concat]) 13909 13910 Attributes 13911 ---------- 13912 13913 concat : List(:class:`Spec`) 13914 A list of views to be concatenated. 13915 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 13916 The alignment to apply to grid rows and columns. 13917 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 13918 13919 13920 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 13921 placed one after the other. 13922 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 13923 or column may be of variable size. 13924 * For ``"all"``, subviews will be aligned and each row or column will be sized 13925 identically based on the maximum observed size. String values for this property 13926 will be applied to both grid rows and columns. 13927 13928 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 13929 be used to supply different alignments for rows and columns. 13930 13931 **Default value:** ``"all"``. 13932 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 13933 Sets how the visualization size should be determined. If a string, should be one of 13934 ``"pad"``, ``"fit"`` or ``"none"``. 13935 Object values can additionally specify parameters for content sizing and automatic 13936 resizing. 13937 ``"fit"`` is only supported for single and layered views that don't use 13938 ``rangeStep``. 13939 13940 **Default value** : ``pad`` 13941 background : string 13942 CSS color property to use as the background of the entire view. 13943 13944 **Default value:** none (transparent) 13945 bounds : enum('full', 'flush') 13946 The bounds calculation method to use for determining the extent of a sub-plot. One 13947 of ``full`` (the default) or ``flush``. 13948 13949 13950 * If set to ``full``, the entire calculated bounds (including axes, title, and 13951 legend) will be used. 13952 * If set to ``flush``, only the specified width and height values for the sub-view 13953 will be used. The ``flush`` setting can be useful when attempting to place 13954 sub-plots without axes or legends into a uniform grid structure. 13955 13956 **Default value:** ``"full"`` 13957 center : anyOf(boolean, :class:`RowColboolean`) 13958 Boolean flag indicating if subviews should be centered relative to their respective 13959 rows or columns. 13960 13961 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 13962 supply different centering values for rows and columns. 13963 13964 **Default value:** ``false`` 13965 columns : float 13966 The number of columns to include in the view composition layout. 13967 13968 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 13969 will be assumed. This is equivalent to 13970 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 13971 ``repeat`` ). 13972 13973 **Note** : 13974 13975 1) This property is only for: 13976 13977 13978 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 13979 * the ``facet`` and ``repeat`` operator with one field/repetition definition 13980 (without row/column nesting) 13981 13982 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 13983 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 13984 config : :class:`Config` 13985 Vega-Lite configuration object. This property can only be defined at the top-level 13986 of a specification. 13987 data : anyOf(:class:`Data`, None) 13988 An object describing the data source. Set to ``null`` to ignore the parent's data 13989 source. If no data is set, it is derived from the parent. 13990 datasets : :class:`Datasets` 13991 A global data store for named datasets. This is a mapping from names to inline 13992 datasets. 13993 This can be an array of objects or primitive values or a string. Arrays of primitive 13994 values are ingested as objects with a ``data`` property. 13995 description : string 13996 Description of this mark for commenting purpose. 13997 name : string 13998 Name of the visualization for later reference. 13999 padding : :class:`Padding` 14000 The default visualization padding, in pixels, from the edge of the visualization 14001 canvas to the data rectangle. If a number, specifies padding for all sides. 14002 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14003 "bottom": 5}`` to specify padding for each side of the visualization. 14004 14005 **Default value** : ``5`` 14006 resolve : :class:`Resolve` 14007 Scale, axis, and legend resolutions for view composition specifications. 14008 spacing : anyOf(float, :class:`RowColnumber`) 14009 The spacing in pixels between sub-views of the composition operator. 14010 An object of the form ``{"row": number, "column": number}`` can be used to set 14011 different spacing values for rows and columns. 14012 14013 **Default value** : Depends on ``"spacing"`` property of `the view composition 14014 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 14015 ``20`` by default) 14016 title : anyOf(string, :class:`TitleParams`) 14017 Title for the plot. 14018 transform : List(:class:`Transform`) 14019 An array of data transformations such as filter and new field calculation. 14020 usermeta : Mapping(required=[]) 14021 Optional metadata that will be passed to Vega. 14022 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14023 metadata. 14024 $schema : string 14025 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14026 Unless you have a reason to change this, use 14027 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14028 property allows automatic validation and autocomplete in editors that support JSON 14029 schema. 14030 """ 14031 _schema = {'$ref': '#/definitions/TopLevelConcatSpec'} 14032 14033 def __init__(self, concat=Undefined, align=Undefined, autosize=Undefined, background=Undefined, 14034 bounds=Undefined, center=Undefined, columns=Undefined, config=Undefined, 14035 data=Undefined, datasets=Undefined, description=Undefined, name=Undefined, 14036 padding=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, 14037 transform=Undefined, usermeta=Undefined, **kwds): 14038 super(TopLevelConcatSpec, self).__init__(concat=concat, align=align, autosize=autosize, 14039 background=background, bounds=bounds, center=center, 14040 columns=columns, config=config, data=data, 14041 datasets=datasets, description=description, name=name, 14042 padding=padding, resolve=resolve, spacing=spacing, 14043 title=title, transform=transform, usermeta=usermeta, 14044 **kwds) 14045 14046 14047class TopLevelFacetSpec(TopLevelSpec): 14048 """TopLevelFacetSpec schema wrapper 14049 14050 Mapping(required=[data, facet, spec]) 14051 14052 Attributes 14053 ---------- 14054 14055 data : anyOf(:class:`Data`, None) 14056 An object describing the data source. Set to ``null`` to ignore the parent's data 14057 source. If no data is set, it is derived from the parent. 14058 facet : anyOf(:class:`FacetFieldDef`, :class:`FacetMapping`) 14059 Definition for how to facet the data. One of: 14060 1) `a field definition for faceting the plot by one field 14061 <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 14062 2) `An object that maps row and column channels to their field definitions 14063 <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__ 14064 spec : anyOf(:class:`LayerSpec`, :class:`FacetedUnitSpec`) 14065 A specification of the view that gets faceted. 14066 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 14067 The alignment to apply to grid rows and columns. 14068 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 14069 14070 14071 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 14072 placed one after the other. 14073 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 14074 or column may be of variable size. 14075 * For ``"all"``, subviews will be aligned and each row or column will be sized 14076 identically based on the maximum observed size. String values for this property 14077 will be applied to both grid rows and columns. 14078 14079 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 14080 be used to supply different alignments for rows and columns. 14081 14082 **Default value:** ``"all"``. 14083 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 14084 Sets how the visualization size should be determined. If a string, should be one of 14085 ``"pad"``, ``"fit"`` or ``"none"``. 14086 Object values can additionally specify parameters for content sizing and automatic 14087 resizing. 14088 ``"fit"`` is only supported for single and layered views that don't use 14089 ``rangeStep``. 14090 14091 **Default value** : ``pad`` 14092 background : string 14093 CSS color property to use as the background of the entire view. 14094 14095 **Default value:** none (transparent) 14096 bounds : enum('full', 'flush') 14097 The bounds calculation method to use for determining the extent of a sub-plot. One 14098 of ``full`` (the default) or ``flush``. 14099 14100 14101 * If set to ``full``, the entire calculated bounds (including axes, title, and 14102 legend) will be used. 14103 * If set to ``flush``, only the specified width and height values for the sub-view 14104 will be used. The ``flush`` setting can be useful when attempting to place 14105 sub-plots without axes or legends into a uniform grid structure. 14106 14107 **Default value:** ``"full"`` 14108 center : anyOf(boolean, :class:`RowColboolean`) 14109 Boolean flag indicating if subviews should be centered relative to their respective 14110 rows or columns. 14111 14112 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 14113 supply different centering values for rows and columns. 14114 14115 **Default value:** ``false`` 14116 columns : float 14117 The number of columns to include in the view composition layout. 14118 14119 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 14120 will be assumed. This is equivalent to 14121 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 14122 ``repeat`` ). 14123 14124 **Note** : 14125 14126 1) This property is only for: 14127 14128 14129 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 14130 * the ``facet`` and ``repeat`` operator with one field/repetition definition 14131 (without row/column nesting) 14132 14133 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 14134 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 14135 config : :class:`Config` 14136 Vega-Lite configuration object. This property can only be defined at the top-level 14137 of a specification. 14138 datasets : :class:`Datasets` 14139 A global data store for named datasets. This is a mapping from names to inline 14140 datasets. 14141 This can be an array of objects or primitive values or a string. Arrays of primitive 14142 values are ingested as objects with a ``data`` property. 14143 description : string 14144 Description of this mark for commenting purpose. 14145 name : string 14146 Name of the visualization for later reference. 14147 padding : :class:`Padding` 14148 The default visualization padding, in pixels, from the edge of the visualization 14149 canvas to the data rectangle. If a number, specifies padding for all sides. 14150 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14151 "bottom": 5}`` to specify padding for each side of the visualization. 14152 14153 **Default value** : ``5`` 14154 resolve : :class:`Resolve` 14155 Scale, axis, and legend resolutions for view composition specifications. 14156 spacing : anyOf(float, :class:`RowColnumber`) 14157 The spacing in pixels between sub-views of the composition operator. 14158 An object of the form ``{"row": number, "column": number}`` can be used to set 14159 different spacing values for rows and columns. 14160 14161 **Default value** : Depends on ``"spacing"`` property of `the view composition 14162 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 14163 ``20`` by default) 14164 title : anyOf(string, :class:`TitleParams`) 14165 Title for the plot. 14166 transform : List(:class:`Transform`) 14167 An array of data transformations such as filter and new field calculation. 14168 usermeta : Mapping(required=[]) 14169 Optional metadata that will be passed to Vega. 14170 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14171 metadata. 14172 $schema : string 14173 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14174 Unless you have a reason to change this, use 14175 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14176 property allows automatic validation and autocomplete in editors that support JSON 14177 schema. 14178 """ 14179 _schema = {'$ref': '#/definitions/TopLevelFacetSpec'} 14180 14181 def __init__(self, data=Undefined, facet=Undefined, spec=Undefined, align=Undefined, 14182 autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined, 14183 columns=Undefined, config=Undefined, datasets=Undefined, description=Undefined, 14184 name=Undefined, padding=Undefined, resolve=Undefined, spacing=Undefined, 14185 title=Undefined, transform=Undefined, usermeta=Undefined, **kwds): 14186 super(TopLevelFacetSpec, self).__init__(data=data, facet=facet, spec=spec, align=align, 14187 autosize=autosize, background=background, bounds=bounds, 14188 center=center, columns=columns, config=config, 14189 datasets=datasets, description=description, name=name, 14190 padding=padding, resolve=resolve, spacing=spacing, 14191 title=title, transform=transform, usermeta=usermeta, 14192 **kwds) 14193 14194 14195class TopLevelHConcatSpec(TopLevelSpec): 14196 """TopLevelHConcatSpec schema wrapper 14197 14198 Mapping(required=[hconcat]) 14199 14200 Attributes 14201 ---------- 14202 14203 hconcat : List(:class:`Spec`) 14204 A list of views to be concatenated and put into a row. 14205 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 14206 Sets how the visualization size should be determined. If a string, should be one of 14207 ``"pad"``, ``"fit"`` or ``"none"``. 14208 Object values can additionally specify parameters for content sizing and automatic 14209 resizing. 14210 ``"fit"`` is only supported for single and layered views that don't use 14211 ``rangeStep``. 14212 14213 **Default value** : ``pad`` 14214 background : string 14215 CSS color property to use as the background of the entire view. 14216 14217 **Default value:** none (transparent) 14218 bounds : enum('full', 'flush') 14219 The bounds calculation method to use for determining the extent of a sub-plot. One 14220 of ``full`` (the default) or ``flush``. 14221 14222 14223 * If set to ``full``, the entire calculated bounds (including axes, title, and 14224 legend) will be used. 14225 * If set to ``flush``, only the specified width and height values for the sub-view 14226 will be used. The ``flush`` setting can be useful when attempting to place 14227 sub-plots without axes or legends into a uniform grid structure. 14228 14229 **Default value:** ``"full"`` 14230 center : boolean 14231 Boolean flag indicating if subviews should be centered relative to their respective 14232 rows or columns. 14233 14234 **Default value:** ``false`` 14235 config : :class:`Config` 14236 Vega-Lite configuration object. This property can only be defined at the top-level 14237 of a specification. 14238 data : anyOf(:class:`Data`, None) 14239 An object describing the data source. Set to ``null`` to ignore the parent's data 14240 source. If no data is set, it is derived from the parent. 14241 datasets : :class:`Datasets` 14242 A global data store for named datasets. This is a mapping from names to inline 14243 datasets. 14244 This can be an array of objects or primitive values or a string. Arrays of primitive 14245 values are ingested as objects with a ``data`` property. 14246 description : string 14247 Description of this mark for commenting purpose. 14248 name : string 14249 Name of the visualization for later reference. 14250 padding : :class:`Padding` 14251 The default visualization padding, in pixels, from the edge of the visualization 14252 canvas to the data rectangle. If a number, specifies padding for all sides. 14253 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14254 "bottom": 5}`` to specify padding for each side of the visualization. 14255 14256 **Default value** : ``5`` 14257 resolve : :class:`Resolve` 14258 Scale, axis, and legend resolutions for view composition specifications. 14259 spacing : float 14260 The spacing in pixels between sub-views of the concat operator. 14261 14262 **Default value** : ``10`` 14263 title : anyOf(string, :class:`TitleParams`) 14264 Title for the plot. 14265 transform : List(:class:`Transform`) 14266 An array of data transformations such as filter and new field calculation. 14267 usermeta : Mapping(required=[]) 14268 Optional metadata that will be passed to Vega. 14269 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14270 metadata. 14271 $schema : string 14272 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14273 Unless you have a reason to change this, use 14274 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14275 property allows automatic validation and autocomplete in editors that support JSON 14276 schema. 14277 """ 14278 _schema = {'$ref': '#/definitions/TopLevelHConcatSpec'} 14279 14280 def __init__(self, hconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined, 14281 center=Undefined, config=Undefined, data=Undefined, datasets=Undefined, 14282 description=Undefined, name=Undefined, padding=Undefined, resolve=Undefined, 14283 spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds): 14284 super(TopLevelHConcatSpec, self).__init__(hconcat=hconcat, autosize=autosize, 14285 background=background, bounds=bounds, center=center, 14286 config=config, data=data, datasets=datasets, 14287 description=description, name=name, padding=padding, 14288 resolve=resolve, spacing=spacing, title=title, 14289 transform=transform, usermeta=usermeta, **kwds) 14290 14291 14292class TopLevelLayerSpec(TopLevelSpec): 14293 """TopLevelLayerSpec schema wrapper 14294 14295 Mapping(required=[layer]) 14296 14297 Attributes 14298 ---------- 14299 14300 layer : List(anyOf(:class:`LayerSpec`, :class:`UnitSpec`)) 14301 Layer or single view specifications to be layered. 14302 14303 **Note** : Specifications inside ``layer`` cannot use ``row`` and ``column`` 14304 channels as layering facet specifications is not allowed. Instead, use the `facet 14305 operator <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer 14306 inside a facet. 14307 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 14308 Sets how the visualization size should be determined. If a string, should be one of 14309 ``"pad"``, ``"fit"`` or ``"none"``. 14310 Object values can additionally specify parameters for content sizing and automatic 14311 resizing. 14312 ``"fit"`` is only supported for single and layered views that don't use 14313 ``rangeStep``. 14314 14315 **Default value** : ``pad`` 14316 background : string 14317 CSS color property to use as the background of the entire view. 14318 14319 **Default value:** none (transparent) 14320 config : :class:`Config` 14321 Vega-Lite configuration object. This property can only be defined at the top-level 14322 of a specification. 14323 data : anyOf(:class:`Data`, None) 14324 An object describing the data source. Set to ``null`` to ignore the parent's data 14325 source. If no data is set, it is derived from the parent. 14326 datasets : :class:`Datasets` 14327 A global data store for named datasets. This is a mapping from names to inline 14328 datasets. 14329 This can be an array of objects or primitive values or a string. Arrays of primitive 14330 values are ingested as objects with a ``data`` property. 14331 description : string 14332 Description of this mark for commenting purpose. 14333 encoding : :class:`Encoding` 14334 A shared key-value mapping between encoding channels and definition of fields in the 14335 underlying layers. 14336 height : float 14337 The height of a visualization. 14338 14339 **Default value:** 14340 14341 14342 * If a view's `autosize 14343 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 14344 its y-channel has a `continuous scale 14345 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will 14346 be the value of `config.view.height 14347 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14348 * For y-axis with a band or point scale: if `rangeStep 14349 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 14350 unspecified, the height is `determined by the range step, paddings, and the 14351 cardinality of the field mapped to y-channel 14352 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 14353 ``rangeStep`` is ``null``, the height will be the value of `config.view.height 14354 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14355 * If no field is mapped to ``y`` channel, the ``height`` will be the value of 14356 ``rangeStep``. 14357 14358 **Note** : For plots with `row and column channels 14359 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 14360 height of a single view. 14361 14362 **See also:** The documentation for `width and height 14363 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 14364 name : string 14365 Name of the visualization for later reference. 14366 padding : :class:`Padding` 14367 The default visualization padding, in pixels, from the edge of the visualization 14368 canvas to the data rectangle. If a number, specifies padding for all sides. 14369 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14370 "bottom": 5}`` to specify padding for each side of the visualization. 14371 14372 **Default value** : ``5`` 14373 projection : :class:`Projection` 14374 An object defining properties of the geographic projection shared by underlying 14375 layers. 14376 resolve : :class:`Resolve` 14377 Scale, axis, and legend resolutions for view composition specifications. 14378 title : anyOf(string, :class:`TitleParams`) 14379 Title for the plot. 14380 transform : List(:class:`Transform`) 14381 An array of data transformations such as filter and new field calculation. 14382 usermeta : Mapping(required=[]) 14383 Optional metadata that will be passed to Vega. 14384 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14385 metadata. 14386 view : :class:`ViewBackground` 14387 An object defining the view background's fill and stroke. 14388 14389 **Default value:** none (transparent) 14390 width : float 14391 The width of a visualization. 14392 14393 **Default value:** This will be determined by the following rules: 14394 14395 14396 * If a view's `autosize 14397 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 14398 its x-channel has a `continuous scale 14399 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will 14400 be the value of `config.view.width 14401 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14402 * For x-axis with a band or point scale: if `rangeStep 14403 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 14404 unspecified, the width is `determined by the range step, paddings, and the 14405 cardinality of the field mapped to x-channel 14406 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 14407 ``rangeStep`` is ``null``, the width will be the value of `config.view.width 14408 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14409 * If no field is mapped to ``x`` channel, the ``width`` will be the value of 14410 `config.scale.textXRangeStep 14411 <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for 14412 ``text`` mark and the value of ``rangeStep`` for other marks. 14413 14414 **Note:** For plots with `row and column channels 14415 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 14416 width of a single view. 14417 14418 **See also:** The documentation for `width and height 14419 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 14420 $schema : string 14421 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14422 Unless you have a reason to change this, use 14423 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14424 property allows automatic validation and autocomplete in editors that support JSON 14425 schema. 14426 """ 14427 _schema = {'$ref': '#/definitions/TopLevelLayerSpec'} 14428 14429 def __init__(self, layer=Undefined, autosize=Undefined, background=Undefined, config=Undefined, 14430 data=Undefined, datasets=Undefined, description=Undefined, encoding=Undefined, 14431 height=Undefined, name=Undefined, padding=Undefined, projection=Undefined, 14432 resolve=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, 14433 view=Undefined, width=Undefined, **kwds): 14434 super(TopLevelLayerSpec, self).__init__(layer=layer, autosize=autosize, background=background, 14435 config=config, data=data, datasets=datasets, 14436 description=description, encoding=encoding, 14437 height=height, name=name, padding=padding, 14438 projection=projection, resolve=resolve, title=title, 14439 transform=transform, usermeta=usermeta, view=view, 14440 width=width, **kwds) 14441 14442 14443class TopLevelRepeatSpec(TopLevelSpec): 14444 """TopLevelRepeatSpec schema wrapper 14445 14446 Mapping(required=[repeat, spec]) 14447 14448 Attributes 14449 ---------- 14450 14451 repeat : anyOf(List(string), :class:`RepeatMapping`) 14452 Definition for fields to be repeated. One of: 14453 1) An array of fields to be repeated. If ``"repeat"`` is an array, the field can be 14454 referred using ``{"repeat": "repeat"}`` 14455 2) An object that mapped ``"row"`` and/or ``"column"`` to the listed of fields to be 14456 repeated along the particular orientations. The objects ``{"repeat": "row"}`` and 14457 ``{"repeat": "column"}`` can be used to refer to the repeated field respectively. 14458 spec : :class:`Spec` 14459 A specification of the view that gets repeated. 14460 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 14461 The alignment to apply to grid rows and columns. 14462 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 14463 14464 14465 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 14466 placed one after the other. 14467 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 14468 or column may be of variable size. 14469 * For ``"all"``, subviews will be aligned and each row or column will be sized 14470 identically based on the maximum observed size. String values for this property 14471 will be applied to both grid rows and columns. 14472 14473 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 14474 be used to supply different alignments for rows and columns. 14475 14476 **Default value:** ``"all"``. 14477 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 14478 Sets how the visualization size should be determined. If a string, should be one of 14479 ``"pad"``, ``"fit"`` or ``"none"``. 14480 Object values can additionally specify parameters for content sizing and automatic 14481 resizing. 14482 ``"fit"`` is only supported for single and layered views that don't use 14483 ``rangeStep``. 14484 14485 **Default value** : ``pad`` 14486 background : string 14487 CSS color property to use as the background of the entire view. 14488 14489 **Default value:** none (transparent) 14490 bounds : enum('full', 'flush') 14491 The bounds calculation method to use for determining the extent of a sub-plot. One 14492 of ``full`` (the default) or ``flush``. 14493 14494 14495 * If set to ``full``, the entire calculated bounds (including axes, title, and 14496 legend) will be used. 14497 * If set to ``flush``, only the specified width and height values for the sub-view 14498 will be used. The ``flush`` setting can be useful when attempting to place 14499 sub-plots without axes or legends into a uniform grid structure. 14500 14501 **Default value:** ``"full"`` 14502 center : anyOf(boolean, :class:`RowColboolean`) 14503 Boolean flag indicating if subviews should be centered relative to their respective 14504 rows or columns. 14505 14506 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 14507 supply different centering values for rows and columns. 14508 14509 **Default value:** ``false`` 14510 columns : float 14511 The number of columns to include in the view composition layout. 14512 14513 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 14514 will be assumed. This is equivalent to 14515 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 14516 ``repeat`` ). 14517 14518 **Note** : 14519 14520 1) This property is only for: 14521 14522 14523 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 14524 * the ``facet`` and ``repeat`` operator with one field/repetition definition 14525 (without row/column nesting) 14526 14527 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 14528 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 14529 config : :class:`Config` 14530 Vega-Lite configuration object. This property can only be defined at the top-level 14531 of a specification. 14532 data : anyOf(:class:`Data`, None) 14533 An object describing the data source. Set to ``null`` to ignore the parent's data 14534 source. If no data is set, it is derived from the parent. 14535 datasets : :class:`Datasets` 14536 A global data store for named datasets. This is a mapping from names to inline 14537 datasets. 14538 This can be an array of objects or primitive values or a string. Arrays of primitive 14539 values are ingested as objects with a ``data`` property. 14540 description : string 14541 Description of this mark for commenting purpose. 14542 name : string 14543 Name of the visualization for later reference. 14544 padding : :class:`Padding` 14545 The default visualization padding, in pixels, from the edge of the visualization 14546 canvas to the data rectangle. If a number, specifies padding for all sides. 14547 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14548 "bottom": 5}`` to specify padding for each side of the visualization. 14549 14550 **Default value** : ``5`` 14551 resolve : :class:`Resolve` 14552 Scale, axis, and legend resolutions for view composition specifications. 14553 spacing : anyOf(float, :class:`RowColnumber`) 14554 The spacing in pixels between sub-views of the composition operator. 14555 An object of the form ``{"row": number, "column": number}`` can be used to set 14556 different spacing values for rows and columns. 14557 14558 **Default value** : Depends on ``"spacing"`` property of `the view composition 14559 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 14560 ``20`` by default) 14561 title : anyOf(string, :class:`TitleParams`) 14562 Title for the plot. 14563 transform : List(:class:`Transform`) 14564 An array of data transformations such as filter and new field calculation. 14565 usermeta : Mapping(required=[]) 14566 Optional metadata that will be passed to Vega. 14567 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14568 metadata. 14569 $schema : string 14570 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14571 Unless you have a reason to change this, use 14572 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14573 property allows automatic validation and autocomplete in editors that support JSON 14574 schema. 14575 """ 14576 _schema = {'$ref': '#/definitions/TopLevelRepeatSpec'} 14577 14578 def __init__(self, repeat=Undefined, spec=Undefined, align=Undefined, autosize=Undefined, 14579 background=Undefined, bounds=Undefined, center=Undefined, columns=Undefined, 14580 config=Undefined, data=Undefined, datasets=Undefined, description=Undefined, 14581 name=Undefined, padding=Undefined, resolve=Undefined, spacing=Undefined, 14582 title=Undefined, transform=Undefined, usermeta=Undefined, **kwds): 14583 super(TopLevelRepeatSpec, self).__init__(repeat=repeat, spec=spec, align=align, 14584 autosize=autosize, background=background, 14585 bounds=bounds, center=center, columns=columns, 14586 config=config, data=data, datasets=datasets, 14587 description=description, name=name, padding=padding, 14588 resolve=resolve, spacing=spacing, title=title, 14589 transform=transform, usermeta=usermeta, **kwds) 14590 14591 14592class TopLevelUnitSpec(TopLevelSpec): 14593 """TopLevelUnitSpec schema wrapper 14594 14595 Mapping(required=[data, mark]) 14596 14597 Attributes 14598 ---------- 14599 14600 data : anyOf(:class:`Data`, None) 14601 An object describing the data source. Set to ``null`` to ignore the parent's data 14602 source. If no data is set, it is derived from the parent. 14603 mark : :class:`AnyMark` 14604 A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, 14605 ``"tick"``, ``"line"``, 14606 ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark 14607 definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. 14608 align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`) 14609 The alignment to apply to grid rows and columns. 14610 The supported string values are ``"all"``, ``"each"``, and ``"none"``. 14611 14612 14613 * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply 14614 placed one after the other. 14615 * For ``"each"``, subviews will be aligned into a clean grid structure, but each row 14616 or column may be of variable size. 14617 * For ``"all"``, subviews will be aligned and each row or column will be sized 14618 identically based on the maximum observed size. String values for this property 14619 will be applied to both grid rows and columns. 14620 14621 Alternatively, an object value of the form ``{"row": string, "column": string}`` can 14622 be used to supply different alignments for rows and columns. 14623 14624 **Default value:** ``"all"``. 14625 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 14626 Sets how the visualization size should be determined. If a string, should be one of 14627 ``"pad"``, ``"fit"`` or ``"none"``. 14628 Object values can additionally specify parameters for content sizing and automatic 14629 resizing. 14630 ``"fit"`` is only supported for single and layered views that don't use 14631 ``rangeStep``. 14632 14633 **Default value** : ``pad`` 14634 background : string 14635 CSS color property to use as the background of the entire view. 14636 14637 **Default value:** none (transparent) 14638 bounds : enum('full', 'flush') 14639 The bounds calculation method to use for determining the extent of a sub-plot. One 14640 of ``full`` (the default) or ``flush``. 14641 14642 14643 * If set to ``full``, the entire calculated bounds (including axes, title, and 14644 legend) will be used. 14645 * If set to ``flush``, only the specified width and height values for the sub-view 14646 will be used. The ``flush`` setting can be useful when attempting to place 14647 sub-plots without axes or legends into a uniform grid structure. 14648 14649 **Default value:** ``"full"`` 14650 center : anyOf(boolean, :class:`RowColboolean`) 14651 Boolean flag indicating if subviews should be centered relative to their respective 14652 rows or columns. 14653 14654 An object value of the form ``{"row": boolean, "column": boolean}`` can be used to 14655 supply different centering values for rows and columns. 14656 14657 **Default value:** ``false`` 14658 columns : float 14659 The number of columns to include in the view composition layout. 14660 14661 **Default value** : ``undefined`` -- An infinite number of columns (a single row) 14662 will be assumed. This is equivalent to 14663 ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and 14664 ``repeat`` ). 14665 14666 **Note** : 14667 14668 1) This property is only for: 14669 14670 14671 * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` ) 14672 * the ``facet`` and ``repeat`` operator with one field/repetition definition 14673 (without row/column nesting) 14674 14675 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` ) 14676 and to using the ``row`` channel (for ``facet`` and ``repeat`` ). 14677 config : :class:`Config` 14678 Vega-Lite configuration object. This property can only be defined at the top-level 14679 of a specification. 14680 datasets : :class:`Datasets` 14681 A global data store for named datasets. This is a mapping from names to inline 14682 datasets. 14683 This can be an array of objects or primitive values or a string. Arrays of primitive 14684 values are ingested as objects with a ``data`` property. 14685 description : string 14686 Description of this mark for commenting purpose. 14687 encoding : :class:`FacetedEncoding` 14688 A key-value mapping between encoding channels and definition of fields. 14689 height : float 14690 The height of a visualization. 14691 14692 **Default value:** 14693 14694 14695 * If a view's `autosize 14696 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 14697 its y-channel has a `continuous scale 14698 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will 14699 be the value of `config.view.height 14700 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14701 * For y-axis with a band or point scale: if `rangeStep 14702 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 14703 unspecified, the height is `determined by the range step, paddings, and the 14704 cardinality of the field mapped to y-channel 14705 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 14706 ``rangeStep`` is ``null``, the height will be the value of `config.view.height 14707 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14708 * If no field is mapped to ``y`` channel, the ``height`` will be the value of 14709 ``rangeStep``. 14710 14711 **Note** : For plots with `row and column channels 14712 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 14713 height of a single view. 14714 14715 **See also:** The documentation for `width and height 14716 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 14717 name : string 14718 Name of the visualization for later reference. 14719 padding : :class:`Padding` 14720 The default visualization padding, in pixels, from the edge of the visualization 14721 canvas to the data rectangle. If a number, specifies padding for all sides. 14722 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14723 "bottom": 5}`` to specify padding for each side of the visualization. 14724 14725 **Default value** : ``5`` 14726 projection : :class:`Projection` 14727 An object defining properties of geographic projection, which will be applied to 14728 ``shape`` path for ``"geoshape"`` marks 14729 and to ``latitude`` and ``"longitude"`` channels for other marks. 14730 resolve : :class:`Resolve` 14731 Scale, axis, and legend resolutions for view composition specifications. 14732 selection : Mapping(required=[]) 14733 A key-value mapping between selection names and definitions. 14734 spacing : anyOf(float, :class:`RowColnumber`) 14735 The spacing in pixels between sub-views of the composition operator. 14736 An object of the form ``{"row": number, "column": number}`` can be used to set 14737 different spacing values for rows and columns. 14738 14739 **Default value** : Depends on ``"spacing"`` property of `the view composition 14740 configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ ( 14741 ``20`` by default) 14742 title : anyOf(string, :class:`TitleParams`) 14743 Title for the plot. 14744 transform : List(:class:`Transform`) 14745 An array of data transformations such as filter and new field calculation. 14746 usermeta : Mapping(required=[]) 14747 Optional metadata that will be passed to Vega. 14748 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14749 metadata. 14750 view : :class:`ViewBackground` 14751 An object defining the view background's fill and stroke. 14752 14753 **Default value:** none (transparent) 14754 width : float 14755 The width of a visualization. 14756 14757 **Default value:** This will be determined by the following rules: 14758 14759 14760 * If a view's `autosize 14761 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 14762 its x-channel has a `continuous scale 14763 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will 14764 be the value of `config.view.width 14765 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14766 * For x-axis with a band or point scale: if `rangeStep 14767 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 14768 unspecified, the width is `determined by the range step, paddings, and the 14769 cardinality of the field mapped to x-channel 14770 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 14771 ``rangeStep`` is ``null``, the width will be the value of `config.view.width 14772 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 14773 * If no field is mapped to ``x`` channel, the ``width`` will be the value of 14774 `config.scale.textXRangeStep 14775 <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for 14776 ``text`` mark and the value of ``rangeStep`` for other marks. 14777 14778 **Note:** For plots with `row and column channels 14779 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 14780 width of a single view. 14781 14782 **See also:** The documentation for `width and height 14783 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 14784 $schema : string 14785 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14786 Unless you have a reason to change this, use 14787 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14788 property allows automatic validation and autocomplete in editors that support JSON 14789 schema. 14790 """ 14791 _schema = {'$ref': '#/definitions/TopLevelUnitSpec'} 14792 14793 def __init__(self, data=Undefined, mark=Undefined, align=Undefined, autosize=Undefined, 14794 background=Undefined, bounds=Undefined, center=Undefined, columns=Undefined, 14795 config=Undefined, datasets=Undefined, description=Undefined, encoding=Undefined, 14796 height=Undefined, name=Undefined, padding=Undefined, projection=Undefined, 14797 resolve=Undefined, selection=Undefined, spacing=Undefined, title=Undefined, 14798 transform=Undefined, usermeta=Undefined, view=Undefined, width=Undefined, **kwds): 14799 super(TopLevelUnitSpec, self).__init__(data=data, mark=mark, align=align, autosize=autosize, 14800 background=background, bounds=bounds, center=center, 14801 columns=columns, config=config, datasets=datasets, 14802 description=description, encoding=encoding, 14803 height=height, name=name, padding=padding, 14804 projection=projection, resolve=resolve, 14805 selection=selection, spacing=spacing, title=title, 14806 transform=transform, usermeta=usermeta, view=view, 14807 width=width, **kwds) 14808 14809 14810class TopLevelVConcatSpec(TopLevelSpec): 14811 """TopLevelVConcatSpec schema wrapper 14812 14813 Mapping(required=[vconcat]) 14814 14815 Attributes 14816 ---------- 14817 14818 vconcat : List(:class:`Spec`) 14819 A list of views to be concatenated and put into a column. 14820 autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`) 14821 Sets how the visualization size should be determined. If a string, should be one of 14822 ``"pad"``, ``"fit"`` or ``"none"``. 14823 Object values can additionally specify parameters for content sizing and automatic 14824 resizing. 14825 ``"fit"`` is only supported for single and layered views that don't use 14826 ``rangeStep``. 14827 14828 **Default value** : ``pad`` 14829 background : string 14830 CSS color property to use as the background of the entire view. 14831 14832 **Default value:** none (transparent) 14833 bounds : enum('full', 'flush') 14834 The bounds calculation method to use for determining the extent of a sub-plot. One 14835 of ``full`` (the default) or ``flush``. 14836 14837 14838 * If set to ``full``, the entire calculated bounds (including axes, title, and 14839 legend) will be used. 14840 * If set to ``flush``, only the specified width and height values for the sub-view 14841 will be used. The ``flush`` setting can be useful when attempting to place 14842 sub-plots without axes or legends into a uniform grid structure. 14843 14844 **Default value:** ``"full"`` 14845 center : boolean 14846 Boolean flag indicating if subviews should be centered relative to their respective 14847 rows or columns. 14848 14849 **Default value:** ``false`` 14850 config : :class:`Config` 14851 Vega-Lite configuration object. This property can only be defined at the top-level 14852 of a specification. 14853 data : anyOf(:class:`Data`, None) 14854 An object describing the data source. Set to ``null`` to ignore the parent's data 14855 source. If no data is set, it is derived from the parent. 14856 datasets : :class:`Datasets` 14857 A global data store for named datasets. This is a mapping from names to inline 14858 datasets. 14859 This can be an array of objects or primitive values or a string. Arrays of primitive 14860 values are ingested as objects with a ``data`` property. 14861 description : string 14862 Description of this mark for commenting purpose. 14863 name : string 14864 Name of the visualization for later reference. 14865 padding : :class:`Padding` 14866 The default visualization padding, in pixels, from the edge of the visualization 14867 canvas to the data rectangle. If a number, specifies padding for all sides. 14868 If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5, 14869 "bottom": 5}`` to specify padding for each side of the visualization. 14870 14871 **Default value** : ``5`` 14872 resolve : :class:`Resolve` 14873 Scale, axis, and legend resolutions for view composition specifications. 14874 spacing : float 14875 The spacing in pixels between sub-views of the concat operator. 14876 14877 **Default value** : ``10`` 14878 title : anyOf(string, :class:`TitleParams`) 14879 Title for the plot. 14880 transform : List(:class:`Transform`) 14881 An array of data transformations such as filter and new field calculation. 14882 usermeta : Mapping(required=[]) 14883 Optional metadata that will be passed to Vega. 14884 This object is completely ignored by Vega and Vega-Lite and can be used for custom 14885 metadata. 14886 $schema : string 14887 URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification. 14888 Unless you have a reason to change this, use 14889 ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema`` 14890 property allows automatic validation and autocomplete in editors that support JSON 14891 schema. 14892 """ 14893 _schema = {'$ref': '#/definitions/TopLevelVConcatSpec'} 14894 14895 def __init__(self, vconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined, 14896 center=Undefined, config=Undefined, data=Undefined, datasets=Undefined, 14897 description=Undefined, name=Undefined, padding=Undefined, resolve=Undefined, 14898 spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds): 14899 super(TopLevelVConcatSpec, self).__init__(vconcat=vconcat, autosize=autosize, 14900 background=background, bounds=bounds, center=center, 14901 config=config, data=data, datasets=datasets, 14902 description=description, name=name, padding=padding, 14903 resolve=resolve, spacing=spacing, title=title, 14904 transform=transform, usermeta=usermeta, **kwds) 14905 14906 14907class TopoDataFormat(DataFormat): 14908 """TopoDataFormat schema wrapper 14909 14910 Mapping(required=[]) 14911 14912 Attributes 14913 ---------- 14914 14915 feature : string 14916 The name of the TopoJSON object set to convert to a GeoJSON feature collection. 14917 For example, in a map of the world, there may be an object set named 14918 ``"countries"``. 14919 Using the feature property, we can extract this set and generate a GeoJSON feature 14920 object for each country. 14921 mesh : string 14922 The name of the TopoJSON object set to convert to mesh. 14923 Similar to the ``feature`` option, ``mesh`` extracts a named TopoJSON object set. 14924 Unlike the ``feature`` option, the corresponding geo data is returned as a single, 14925 unified mesh instance, not as individual GeoJSON features. 14926 Extracting a mesh is useful for more efficiently drawing borders or other geographic 14927 elements that you do not need to associate with specific regions such as individual 14928 countries, states or counties. 14929 parse : anyOf(:class:`Parse`, None) 14930 If set to ``null``, disable type inference based on the spec and only use type 14931 inference based on the data. 14932 Alternatively, a parsing directive object can be provided for explicit data types. 14933 Each property of the object corresponds to a field name, and the value to the 14934 desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not 14935 parse the field)). 14936 For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field 14937 in each input record a Date value. 14938 14939 For ``"date"``, we parse data based using Javascript's `Date.parse() 14940 <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__. 14941 For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using 14942 the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__. 14943 UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ). 14944 See more about `UTC time 14945 <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__ 14946 type : enum('topojson') 14947 Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. 14948 14949 **Default value:** The default format type is determined by the extension of the 14950 file URL. 14951 If no extension is detected, ``"json"`` will be used by default. 14952 """ 14953 _schema = {'$ref': '#/definitions/TopoDataFormat'} 14954 14955 def __init__(self, feature=Undefined, mesh=Undefined, parse=Undefined, type=Undefined, **kwds): 14956 super(TopoDataFormat, self).__init__(feature=feature, mesh=mesh, parse=parse, type=type, **kwds) 14957 14958 14959class Transform(VegaLiteSchema): 14960 """Transform schema wrapper 14961 14962 anyOf(:class:`AggregateTransform`, :class:`BinTransform`, :class:`CalculateTransform`, 14963 :class:`FilterTransform`, :class:`FlattenTransform`, :class:`FoldTransform`, 14964 :class:`ImputeTransform`, :class:`JoinAggregateTransform`, :class:`LookupTransform`, 14965 :class:`TimeUnitTransform`, :class:`SampleTransform`, :class:`StackTransform`, 14966 :class:`WindowTransform`) 14967 """ 14968 _schema = {'$ref': '#/definitions/Transform'} 14969 14970 def __init__(self, *args, **kwds): 14971 super(Transform, self).__init__(*args, **kwds) 14972 14973 14974class AggregateTransform(Transform): 14975 """AggregateTransform schema wrapper 14976 14977 Mapping(required=[aggregate]) 14978 14979 Attributes 14980 ---------- 14981 14982 aggregate : List(:class:`AggregatedFieldDef`) 14983 Array of objects that define fields to aggregate. 14984 groupby : List(:class:`FieldName`) 14985 The data fields to group by. If not specified, a single group containing all data 14986 objects will be used. 14987 """ 14988 _schema = {'$ref': '#/definitions/AggregateTransform'} 14989 14990 def __init__(self, aggregate=Undefined, groupby=Undefined, **kwds): 14991 super(AggregateTransform, self).__init__(aggregate=aggregate, groupby=groupby, **kwds) 14992 14993 14994class BinTransform(Transform): 14995 """BinTransform schema wrapper 14996 14997 Mapping(required=[bin, field, as]) 14998 14999 Attributes 15000 ---------- 15001 15002 bin : anyOf(enum(True), :class:`BinParams`) 15003 An object indicating bin properties, or simply ``true`` for using default bin 15004 parameters. 15005 field : :class:`FieldName` 15006 The data field to bin. 15007 as : anyOf(:class:`FieldName`, List(:class:`FieldName`)) 15008 The output fields at which to write the start and end bin values. 15009 """ 15010 _schema = {'$ref': '#/definitions/BinTransform'} 15011 15012 def __init__(self, bin=Undefined, field=Undefined, **kwds): 15013 super(BinTransform, self).__init__(bin=bin, field=field, **kwds) 15014 15015 15016class CalculateTransform(Transform): 15017 """CalculateTransform schema wrapper 15018 15019 Mapping(required=[calculate, as]) 15020 15021 Attributes 15022 ---------- 15023 15024 calculate : string 15025 A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__ 15026 string. Use the variable ``datum`` to refer to the current data object. 15027 as : :class:`FieldName` 15028 The field for storing the computed formula value. 15029 """ 15030 _schema = {'$ref': '#/definitions/CalculateTransform'} 15031 15032 def __init__(self, calculate=Undefined, **kwds): 15033 super(CalculateTransform, self).__init__(calculate=calculate, **kwds) 15034 15035 15036class FilterTransform(Transform): 15037 """FilterTransform schema wrapper 15038 15039 Mapping(required=[filter]) 15040 15041 Attributes 15042 ---------- 15043 15044 filter : :class:`LogicalOperandPredicate` 15045 The ``filter`` property must be one of the predicate definitions: 15046 15047 1) an `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__ 15048 string, 15049 where ``datum`` can be used to refer to the current data object 15050 15051 2) one of the field predicates: `equal 15052 <https://vega.github.io/vega-lite/docs/filter.html#equal-predicate>`__, 15053 `lt <https://vega.github.io/vega-lite/docs/filter.html#lt-predicate>`__, 15054 `lte <https://vega.github.io/vega-lite/docs/filter.html#lte-predicate>`__, 15055 `gt <https://vega.github.io/vega-lite/docs/filter.html#gt-predicate>`__, 15056 `gte <https://vega.github.io/vega-lite/docs/filter.html#gte-predicate>`__, 15057 `range <https://vega.github.io/vega-lite/docs/filter.html#range-predicate>`__, 15058 `oneOf <https://vega.github.io/vega-lite/docs/filter.html#one-of-predicate>`__, 15059 or `valid <https://vega.github.io/vega-lite/docs/filter.html#valid-predicate>`__, 15060 15061 3) a `selection predicate 15062 <https://vega.github.io/vega-lite/docs/filter.html#selection-predicate>`__ 15063 15064 4) a logical operand that combines (1), (2), or (3). 15065 """ 15066 _schema = {'$ref': '#/definitions/FilterTransform'} 15067 15068 def __init__(self, filter=Undefined, **kwds): 15069 super(FilterTransform, self).__init__(filter=filter, **kwds) 15070 15071 15072class FlattenTransform(Transform): 15073 """FlattenTransform schema wrapper 15074 15075 Mapping(required=[flatten]) 15076 15077 Attributes 15078 ---------- 15079 15080 flatten : List(:class:`FieldName`) 15081 An array of one or more data fields containing arrays to flatten. 15082 If multiple fields are specified, their array values should have a parallel 15083 structure, ideally with the same length. 15084 If the lengths of parallel arrays do not match, 15085 the longest array will be used with ``null`` values added for missing entries. 15086 as : List(:class:`FieldName`) 15087 The output field names for extracted array values. 15088 15089 **Default value:** The field name of the corresponding array field 15090 """ 15091 _schema = {'$ref': '#/definitions/FlattenTransform'} 15092 15093 def __init__(self, flatten=Undefined, **kwds): 15094 super(FlattenTransform, self).__init__(flatten=flatten, **kwds) 15095 15096 15097class FoldTransform(Transform): 15098 """FoldTransform schema wrapper 15099 15100 Mapping(required=[fold]) 15101 15102 Attributes 15103 ---------- 15104 15105 fold : List(:class:`FieldName`) 15106 An array of data fields indicating the properties to fold. 15107 as : List([:class:`FieldName`, :class:`FieldName`]) 15108 The output field names for the key and value properties produced by the fold 15109 transform. 15110 **Default value:** ``["key", "value"]`` 15111 """ 15112 _schema = {'$ref': '#/definitions/FoldTransform'} 15113 15114 def __init__(self, fold=Undefined, **kwds): 15115 super(FoldTransform, self).__init__(fold=fold, **kwds) 15116 15117 15118class ImputeTransform(Transform): 15119 """ImputeTransform schema wrapper 15120 15121 Mapping(required=[impute, key]) 15122 15123 Attributes 15124 ---------- 15125 15126 impute : :class:`FieldName` 15127 The data field for which the missing values should be imputed. 15128 key : :class:`FieldName` 15129 A key field that uniquely identifies data objects within a group. 15130 Missing key values (those occurring in the data but not in the current group) will 15131 be imputed. 15132 frame : List(anyOf(None, float)) 15133 A frame specification as a two-element array used to control the window over which 15134 the specified method is applied. The array entries should either be a number 15135 indicating the offset from the current data object, or null to indicate unbounded 15136 rows preceding or following the current data object. For example, the value ``[-5, 15137 5]`` indicates that the window should include five objects preceding and five 15138 objects following the current object. 15139 15140 **Default value:** : ``[null, null]`` indicating that the window includes all 15141 objects. 15142 groupby : List(:class:`FieldName`) 15143 An optional array of fields by which to group the values. 15144 Imputation will then be performed on a per-group basis. 15145 keyvals : anyOf(List(Any), :class:`ImputeSequence`) 15146 Defines the key values that should be considered for imputation. 15147 An array of key values or an object defining a `number sequence 15148 <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__. 15149 15150 If provided, this will be used in addition to the key values observed within the 15151 input data. If not provided, the values will be derived from all unique values of 15152 the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if 15153 the y-field is imputed, or vice versa. 15154 15155 If there is no impute grouping, this property *must* be specified. 15156 method : :class:`ImputeMethod` 15157 The imputation method to use for the field value of imputed data objects. 15158 One of ``value``, ``mean``, ``median``, ``max`` or ``min``. 15159 15160 **Default value:** ``"value"`` 15161 value : Any 15162 The field value to use when the imputation ``method`` is ``"value"``. 15163 """ 15164 _schema = {'$ref': '#/definitions/ImputeTransform'} 15165 15166 def __init__(self, impute=Undefined, key=Undefined, frame=Undefined, groupby=Undefined, 15167 keyvals=Undefined, method=Undefined, value=Undefined, **kwds): 15168 super(ImputeTransform, self).__init__(impute=impute, key=key, frame=frame, groupby=groupby, 15169 keyvals=keyvals, method=method, value=value, **kwds) 15170 15171 15172class JoinAggregateTransform(Transform): 15173 """JoinAggregateTransform schema wrapper 15174 15175 Mapping(required=[joinaggregate]) 15176 15177 Attributes 15178 ---------- 15179 15180 joinaggregate : List(:class:`JoinAggregateFieldDef`) 15181 The definition of the fields in the join aggregate, and what calculations to use. 15182 groupby : List(:class:`FieldName`) 15183 The data fields for partitioning the data objects into separate groups. If 15184 unspecified, all data points will be in a single group. 15185 """ 15186 _schema = {'$ref': '#/definitions/JoinAggregateTransform'} 15187 15188 def __init__(self, joinaggregate=Undefined, groupby=Undefined, **kwds): 15189 super(JoinAggregateTransform, self).__init__(joinaggregate=joinaggregate, groupby=groupby, 15190 **kwds) 15191 15192 15193class LookupTransform(Transform): 15194 """LookupTransform schema wrapper 15195 15196 Mapping(required=[lookup, from]) 15197 15198 Attributes 15199 ---------- 15200 15201 lookup : :class:`FieldName` 15202 Key in primary data source. 15203 default : string 15204 The default value to use if lookup fails. 15205 15206 **Default value:** ``null`` 15207 as : anyOf(:class:`FieldName`, List(:class:`FieldName`)) 15208 The field or fields for storing the computed formula value. 15209 If ``from.fields`` is specified, the transform will use the same names for ``as``. 15210 If ``from.fields`` is not specified, ``as`` has to be a string and we put the whole 15211 object into the data under the specified name. 15212 from : :class:`LookupData` 15213 Secondary data reference. 15214 """ 15215 _schema = {'$ref': '#/definitions/LookupTransform'} 15216 15217 def __init__(self, lookup=Undefined, default=Undefined, **kwds): 15218 super(LookupTransform, self).__init__(lookup=lookup, default=default, **kwds) 15219 15220 15221class SampleTransform(Transform): 15222 """SampleTransform schema wrapper 15223 15224 Mapping(required=[sample]) 15225 15226 Attributes 15227 ---------- 15228 15229 sample : float 15230 The maximum number of data objects to include in the sample. 15231 15232 **Default value:** ``1000`` 15233 """ 15234 _schema = {'$ref': '#/definitions/SampleTransform'} 15235 15236 def __init__(self, sample=Undefined, **kwds): 15237 super(SampleTransform, self).__init__(sample=sample, **kwds) 15238 15239 15240class StackTransform(Transform): 15241 """StackTransform schema wrapper 15242 15243 Mapping(required=[stack, groupby, as]) 15244 15245 Attributes 15246 ---------- 15247 15248 groupby : List(:class:`FieldName`) 15249 The data fields to group by. 15250 stack : :class:`FieldName` 15251 The field which is stacked. 15252 offset : enum('zero', 'center', 'normalize') 15253 Mode for stacking marks. 15254 **Default value:** ``"zero"`` 15255 sort : List(:class:`SortField`) 15256 Field that determines the order of leaves in the stacked charts. 15257 as : anyOf(:class:`FieldName`, List(:class:`FieldName`)) 15258 Output field names. This can be either a string or an array of strings with 15259 two elements denoting the name for the fields for stack start and stack end 15260 respectively. 15261 If a single string(eg."val") is provided, the end field will be "val_end". 15262 """ 15263 _schema = {'$ref': '#/definitions/StackTransform'} 15264 15265 def __init__(self, groupby=Undefined, stack=Undefined, offset=Undefined, sort=Undefined, **kwds): 15266 super(StackTransform, self).__init__(groupby=groupby, stack=stack, offset=offset, sort=sort, 15267 **kwds) 15268 15269 15270class TimeUnitTransform(Transform): 15271 """TimeUnitTransform schema wrapper 15272 15273 Mapping(required=[timeUnit, field, as]) 15274 15275 Attributes 15276 ---------- 15277 15278 field : :class:`FieldName` 15279 The data field to apply time unit. 15280 timeUnit : :class:`TimeUnit` 15281 The timeUnit. 15282 as : :class:`FieldName` 15283 The output field to write the timeUnit value. 15284 """ 15285 _schema = {'$ref': '#/definitions/TimeUnitTransform'} 15286 15287 def __init__(self, field=Undefined, timeUnit=Undefined, **kwds): 15288 super(TimeUnitTransform, self).__init__(field=field, timeUnit=timeUnit, **kwds) 15289 15290 15291class TypeForShape(VegaLiteSchema): 15292 """TypeForShape schema wrapper 15293 15294 enum('nominal', 'ordinal', 'geojson') 15295 """ 15296 _schema = {'$ref': '#/definitions/TypeForShape'} 15297 15298 def __init__(self, *args): 15299 super(TypeForShape, self).__init__(*args) 15300 15301 15302class TypedFieldDef(VegaLiteSchema): 15303 """TypedFieldDef schema wrapper 15304 15305 Mapping(required=[type]) 15306 Definition object for a data field, its type and transformation of an encoding channel. 15307 15308 Attributes 15309 ---------- 15310 15311 type : :class:`StandardType` 15312 The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, 15313 ``"ordinal"``, or ``"nominal"`` ). 15314 It can also be a ``"geojson"`` type for encoding `'geoshape' 15315 <https://vega.github.io/vega-lite/docs/geoshape.html>`__. 15316 15317 **Note:** 15318 15319 15320 * Data values for a temporal field can be either a date-time string (e.g., 15321 ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a 15322 timestamp number (e.g., ``1552199579097`` ). 15323 * Data ``type`` describes the semantics of the data rather than the primitive data 15324 types ( ``number``, ``string``, etc.). The same primitive data type can have 15325 different types of measurement. For example, numeric data can represent 15326 quantitative, ordinal, or nominal data. 15327 * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the 15328 ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) 15329 or `"ordinal" (for using an ordinal bin scale) 15330 <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 15331 * When using with `timeUnit 15332 <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property 15333 can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using 15334 an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. 15335 * When using with `aggregate 15336 <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property 15337 refers to the post-aggregation data type. For example, we can calculate count 15338 ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", 15339 "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output 15340 is ``"quantitative"``. 15341 * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have 15342 ``type`` as they have exactly the same type as their primary channels (e.g., 15343 ``x``, ``y`` ). 15344 15345 **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__ 15346 documentation. 15347 aggregate : :class:`Aggregate` 15348 Aggregation function for the field 15349 (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). 15350 15351 **Default value:** ``undefined`` (None) 15352 15353 **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__ 15354 documentation. 15355 bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None) 15356 A flag for binning a ``quantitative`` field, `an object defining binning parameters 15357 <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the 15358 data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite ( 15359 ``"binned"`` ). 15360 15361 15362 If ``true``, default `binning parameters 15363 <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied. 15364 15365 If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are 15366 already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end 15367 field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to 15368 binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also 15369 set the axis's `tickMinStep 15370 <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property. 15371 15372 **Default value:** ``false`` 15373 15374 **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__ 15375 documentation. 15376 field : :class:`Field` 15377 **Required.** A string defining the name of the field from which to pull a data 15378 value 15379 or an object defining iterated values from the `repeat 15380 <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator. 15381 15382 **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__ 15383 documentation. 15384 15385 **Notes:** 15386 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested 15387 objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). 15388 If field names contain dots or brackets but are not nested, you can use ``\\`` to 15389 escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). 15390 See more details about escaping in the `field documentation 15391 <https://vega.github.io/vega-lite/docs/field.html>`__. 15392 2) ``field`` is not required if ``aggregate`` is ``count``. 15393 timeUnit : :class:`TimeUnit` 15394 Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal 15395 field. 15396 or `a temporal field that gets casted as ordinal 15397 <https://vega.github.io/vega-lite/docs/type.html#cast>`__. 15398 15399 **Default value:** ``undefined`` (None) 15400 15401 **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__ 15402 documentation. 15403 title : anyOf(string, None) 15404 A title for the field. If ``null``, the title will be removed. 15405 15406 **Default value:** derived from the field's name and transformation function ( 15407 ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function, 15408 the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the 15409 field is binned or has a time unit applied, the applied function is shown in 15410 parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). 15411 Otherwise, the title is simply the field name. 15412 15413 **Notes** : 15414 15415 1) You can customize the default field title format by providing the `fieldTitle 15416 <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in 15417 the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle 15418 function via the compile function's options 15419 <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__. 15420 15421 2) If both field definition's ``title`` and axis, header, or legend ``title`` are 15422 defined, axis/header/legend title will be used. 15423 """ 15424 _schema = {'$ref': '#/definitions/TypedFieldDef'} 15425 15426 def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined, 15427 timeUnit=Undefined, title=Undefined, **kwds): 15428 super(TypedFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field, 15429 timeUnit=timeUnit, title=title, **kwds) 15430 15431 15432class UnitSpec(VegaLiteSchema): 15433 """UnitSpec schema wrapper 15434 15435 Mapping(required=[mark]) 15436 Base interface for a unit (single-view) specification. 15437 15438 Attributes 15439 ---------- 15440 15441 mark : :class:`AnyMark` 15442 A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, 15443 ``"tick"``, ``"line"``, 15444 ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark 15445 definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. 15446 data : anyOf(:class:`Data`, None) 15447 An object describing the data source. Set to ``null`` to ignore the parent's data 15448 source. If no data is set, it is derived from the parent. 15449 description : string 15450 Description of this mark for commenting purpose. 15451 encoding : :class:`Encoding` 15452 A key-value mapping between encoding channels and definition of fields. 15453 height : float 15454 The height of a visualization. 15455 15456 **Default value:** 15457 15458 15459 * If a view's `autosize 15460 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 15461 its y-channel has a `continuous scale 15462 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will 15463 be the value of `config.view.height 15464 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 15465 * For y-axis with a band or point scale: if `rangeStep 15466 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 15467 unspecified, the height is `determined by the range step, paddings, and the 15468 cardinality of the field mapped to y-channel 15469 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 15470 ``rangeStep`` is ``null``, the height will be the value of `config.view.height 15471 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 15472 * If no field is mapped to ``y`` channel, the ``height`` will be the value of 15473 ``rangeStep``. 15474 15475 **Note** : For plots with `row and column channels 15476 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 15477 height of a single view. 15478 15479 **See also:** The documentation for `width and height 15480 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 15481 name : string 15482 Name of the visualization for later reference. 15483 projection : :class:`Projection` 15484 An object defining properties of geographic projection, which will be applied to 15485 ``shape`` path for ``"geoshape"`` marks 15486 and to ``latitude`` and ``"longitude"`` channels for other marks. 15487 selection : Mapping(required=[]) 15488 A key-value mapping between selection names and definitions. 15489 title : anyOf(string, :class:`TitleParams`) 15490 Title for the plot. 15491 transform : List(:class:`Transform`) 15492 An array of data transformations such as filter and new field calculation. 15493 view : :class:`ViewBackground` 15494 An object defining the view background's fill and stroke. 15495 15496 **Default value:** none (transparent) 15497 width : float 15498 The width of a visualization. 15499 15500 **Default value:** This will be determined by the following rules: 15501 15502 15503 * If a view's `autosize 15504 <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or 15505 its x-channel has a `continuous scale 15506 <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will 15507 be the value of `config.view.width 15508 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 15509 * For x-axis with a band or point scale: if `rangeStep 15510 <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or 15511 unspecified, the width is `determined by the range step, paddings, and the 15512 cardinality of the field mapped to x-channel 15513 <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the 15514 ``rangeStep`` is ``null``, the width will be the value of `config.view.width 15515 <https://vega.github.io/vega-lite/docs/spec.html#config>`__. 15516 * If no field is mapped to ``x`` channel, the ``width`` will be the value of 15517 `config.scale.textXRangeStep 15518 <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for 15519 ``text`` mark and the value of ``rangeStep`` for other marks. 15520 15521 **Note:** For plots with `row and column channels 15522 <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the 15523 width of a single view. 15524 15525 **See also:** The documentation for `width and height 15526 <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples. 15527 """ 15528 _schema = {'$ref': '#/definitions/UnitSpec'} 15529 15530 def __init__(self, mark=Undefined, data=Undefined, description=Undefined, encoding=Undefined, 15531 height=Undefined, name=Undefined, projection=Undefined, selection=Undefined, 15532 title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds): 15533 super(UnitSpec, self).__init__(mark=mark, data=data, description=description, encoding=encoding, 15534 height=height, name=name, projection=projection, 15535 selection=selection, title=title, transform=transform, view=view, 15536 width=width, **kwds) 15537 15538 15539class UrlData(DataSource): 15540 """UrlData schema wrapper 15541 15542 Mapping(required=[url]) 15543 15544 Attributes 15545 ---------- 15546 15547 url : string 15548 An URL from which to load the data set. Use the ``format.type`` property 15549 to ensure the loaded data is correctly parsed. 15550 format : :class:`DataFormat` 15551 An object that specifies the format for parsing the data. 15552 name : string 15553 Provide a placeholder name and bind data at runtime. 15554 """ 15555 _schema = {'$ref': '#/definitions/UrlData'} 15556 15557 def __init__(self, url=Undefined, format=Undefined, name=Undefined, **kwds): 15558 super(UrlData, self).__init__(url=url, format=format, name=name, **kwds) 15559 15560 15561class UtcMultiTimeUnit(MultiTimeUnit): 15562 """UtcMultiTimeUnit schema wrapper 15563 15564 enum('utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 15565 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 15566 'utcyearmonthdatehoursminutesseconds', 'utcquartermonth', 'utcmonthdate', 15567 'utcmonthdatehours', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 15568 'utcsecondsmilliseconds') 15569 """ 15570 _schema = {'$ref': '#/definitions/UtcMultiTimeUnit'} 15571 15572 def __init__(self, *args): 15573 super(UtcMultiTimeUnit, self).__init__(*args) 15574 15575 15576class UtcSingleTimeUnit(SingleTimeUnit): 15577 """UtcSingleTimeUnit schema wrapper 15578 15579 enum('utcyear', 'utcquarter', 'utcmonth', 'utcday', 'utcdate', 'utchours', 'utcminutes', 15580 'utcseconds', 'utcmilliseconds') 15581 """ 15582 _schema = {'$ref': '#/definitions/UtcSingleTimeUnit'} 15583 15584 def __init__(self, *args): 15585 super(UtcSingleTimeUnit, self).__init__(*args) 15586 15587 15588class VConcatSpec(Spec): 15589 """VConcatSpec schema wrapper 15590 15591 Mapping(required=[vconcat]) 15592 Base interface for a vertical concatenation specification. 15593 15594 Attributes 15595 ---------- 15596 15597 vconcat : List(:class:`Spec`) 15598 A list of views to be concatenated and put into a column. 15599 bounds : enum('full', 'flush') 15600 The bounds calculation method to use for determining the extent of a sub-plot. One 15601 of ``full`` (the default) or ``flush``. 15602 15603 15604 * If set to ``full``, the entire calculated bounds (including axes, title, and 15605 legend) will be used. 15606 * If set to ``flush``, only the specified width and height values for the sub-view 15607 will be used. The ``flush`` setting can be useful when attempting to place 15608 sub-plots without axes or legends into a uniform grid structure. 15609 15610 **Default value:** ``"full"`` 15611 center : boolean 15612 Boolean flag indicating if subviews should be centered relative to their respective 15613 rows or columns. 15614 15615 **Default value:** ``false`` 15616 data : anyOf(:class:`Data`, None) 15617 An object describing the data source. Set to ``null`` to ignore the parent's data 15618 source. If no data is set, it is derived from the parent. 15619 description : string 15620 Description of this mark for commenting purpose. 15621 name : string 15622 Name of the visualization for later reference. 15623 resolve : :class:`Resolve` 15624 Scale, axis, and legend resolutions for view composition specifications. 15625 spacing : float 15626 The spacing in pixels between sub-views of the concat operator. 15627 15628 **Default value** : ``10`` 15629 title : anyOf(string, :class:`TitleParams`) 15630 Title for the plot. 15631 transform : List(:class:`Transform`) 15632 An array of data transformations such as filter and new field calculation. 15633 """ 15634 _schema = {'$ref': '#/definitions/VConcatSpec'} 15635 15636 def __init__(self, vconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined, 15637 description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined, 15638 title=Undefined, transform=Undefined, **kwds): 15639 super(VConcatSpec, self).__init__(vconcat=vconcat, bounds=bounds, center=center, data=data, 15640 description=description, name=name, resolve=resolve, 15641 spacing=spacing, title=title, transform=transform, **kwds) 15642 15643 15644class Value(VegaLiteSchema): 15645 """Value schema wrapper 15646 15647 anyOf(float, string, boolean, None) 15648 """ 15649 _schema = {'$ref': '#/definitions/Value'} 15650 15651 def __init__(self, *args): 15652 super(Value, self).__init__(*args) 15653 15654 15655class ValueDefWithConditionMarkPropFieldDefTypeForShapestringnull(VegaLiteSchema): 15656 """ValueDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper 15657 15658 Mapping(required=[]) 15659 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 15660 optional. 15661 15662 Attributes 15663 ---------- 15664 15665 condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`, 15666 :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`)) 15667 A field definition or one or more value definition(s) with a selection predicate. 15668 value : anyOf(string, None) 15669 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 15670 between ``0`` to ``1`` for opacity). 15671 """ 15672 _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>'} 15673 15674 def __init__(self, condition=Undefined, value=Undefined, **kwds): 15675 super(ValueDefWithConditionMarkPropFieldDefTypeForShapestringnull, self).__init__(condition=condition, 15676 value=value, 15677 **kwds) 15678 15679 15680class ValueDefWithConditionMarkPropFieldDefnumber(VegaLiteSchema): 15681 """ValueDefWithConditionMarkPropFieldDefnumber schema wrapper 15682 15683 Mapping(required=[]) 15684 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 15685 optional. 15686 15687 Attributes 15688 ---------- 15689 15690 condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`, 15691 List(:class:`ConditionalNumberValueDef`)) 15692 A field definition or one or more value definition(s) with a selection predicate. 15693 value : float 15694 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 15695 between ``0`` to ``1`` for opacity). 15696 """ 15697 _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldDef,number>'} 15698 15699 def __init__(self, condition=Undefined, value=Undefined, **kwds): 15700 super(ValueDefWithConditionMarkPropFieldDefnumber, self).__init__(condition=condition, 15701 value=value, **kwds) 15702 15703 15704class ValueDefWithConditionMarkPropFieldDefstringnull(VegaLiteSchema): 15705 """ValueDefWithConditionMarkPropFieldDefstringnull schema wrapper 15706 15707 Mapping(required=[]) 15708 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 15709 optional. 15710 15711 Attributes 15712 ---------- 15713 15714 condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`, 15715 List(:class:`ConditionalStringValueDef`)) 15716 A field definition or one or more value definition(s) with a selection predicate. 15717 value : anyOf(string, None) 15718 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 15719 between ``0`` to ``1`` for opacity). 15720 """ 15721 _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldDef,(string|null)>'} 15722 15723 def __init__(self, condition=Undefined, value=Undefined, **kwds): 15724 super(ValueDefWithConditionMarkPropFieldDefstringnull, self).__init__(condition=condition, 15725 value=value, **kwds) 15726 15727 15728class ValueDefWithConditionTextFieldDefValue(VegaLiteSchema): 15729 """ValueDefWithConditionTextFieldDefValue schema wrapper 15730 15731 Mapping(required=[]) 15732 A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are 15733 optional. 15734 15735 Attributes 15736 ---------- 15737 15738 condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`, 15739 List(:class:`ConditionalValueDef`)) 15740 A field definition or one or more value definition(s) with a selection predicate. 15741 value : :class:`Value` 15742 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 15743 between ``0`` to ``1`` for opacity). 15744 """ 15745 _schema = {'$ref': '#/definitions/ValueDefWithCondition<TextFieldDef,Value>'} 15746 15747 def __init__(self, condition=Undefined, value=Undefined, **kwds): 15748 super(ValueDefWithConditionTextFieldDefValue, self).__init__(condition=condition, value=value, 15749 **kwds) 15750 15751 15752class ViewBackground(VegaLiteSchema): 15753 """ViewBackground schema wrapper 15754 15755 Mapping(required=[]) 15756 15757 Attributes 15758 ---------- 15759 15760 cornerRadius : float 15761 The radius in pixels of rounded rectangle corners. 15762 15763 **Default value:** ``0`` 15764 fill : anyOf(:class:`Color`, None) 15765 The fill color. 15766 15767 **Default value:** ``undefined`` 15768 fillOpacity : float 15769 The fill opacity (value between [0,1]). 15770 15771 **Default value:** ``1`` 15772 opacity : float 15773 The overall opacity (value between [0,1]). 15774 15775 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 15776 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 15777 stroke : anyOf(:class:`Color`, None) 15778 The stroke color. 15779 15780 **Default value:** ``"#ddd"`` 15781 strokeCap : :class:`StrokeCap` 15782 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 15783 ``"square"``. 15784 15785 **Default value:** ``"square"`` 15786 strokeDash : List(float) 15787 An array of alternating stroke, space lengths for creating dashed or dotted lines. 15788 strokeDashOffset : float 15789 The offset (in pixels) into which to begin drawing with the stroke dash array. 15790 strokeJoin : :class:`StrokeJoin` 15791 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 15792 15793 **Default value:** ``"miter"`` 15794 strokeMiterLimit : float 15795 The miter limit at which to bevel a line join. 15796 strokeOpacity : float 15797 The stroke opacity (value between [0,1]). 15798 15799 **Default value:** ``1`` 15800 strokeWidth : float 15801 The stroke width, in pixels. 15802 style : anyOf(string, List(string)) 15803 A string or array of strings indicating the name of custom styles to apply to the 15804 view background. A style is a named collection of mark property defaults defined 15805 within the `style configuration 15806 <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an 15807 array, later styles will override earlier styles. 15808 15809 **Default value:** ``"cell"`` 15810 **Note:** Any specified view background properties will augment the default style. 15811 """ 15812 _schema = {'$ref': '#/definitions/ViewBackground'} 15813 15814 def __init__(self, cornerRadius=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, 15815 stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, 15816 strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, 15817 strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, **kwds): 15818 super(ViewBackground, self).__init__(cornerRadius=cornerRadius, fill=fill, 15819 fillOpacity=fillOpacity, opacity=opacity, stroke=stroke, 15820 strokeCap=strokeCap, strokeDash=strokeDash, 15821 strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin, 15822 strokeMiterLimit=strokeMiterLimit, 15823 strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, 15824 style=style, **kwds) 15825 15826 15827class ViewConfig(VegaLiteSchema): 15828 """ViewConfig schema wrapper 15829 15830 Mapping(required=[]) 15831 15832 Attributes 15833 ---------- 15834 15835 clip : boolean 15836 Whether the view should be clipped. 15837 cornerRadius : float 15838 The radius in pixels of rounded rectangle corners. 15839 15840 **Default value:** ``0`` 15841 fill : anyOf(:class:`Color`, None) 15842 The fill color. 15843 15844 **Default value:** ``undefined`` 15845 fillOpacity : float 15846 The fill opacity (value between [0,1]). 15847 15848 **Default value:** ``1`` 15849 height : float 15850 The default height of the single plot or each plot in a trellis plot when the 15851 visualization has a continuous (non-ordinal) y-scale with ``rangeStep`` = ``null``. 15852 15853 **Default value:** ``200`` 15854 opacity : float 15855 The overall opacity (value between [0,1]). 15856 15857 **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, 15858 ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. 15859 stroke : anyOf(:class:`Color`, None) 15860 The stroke color. 15861 15862 **Default value:** ``"#ddd"`` 15863 strokeCap : :class:`StrokeCap` 15864 The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or 15865 ``"square"``. 15866 15867 **Default value:** ``"square"`` 15868 strokeDash : List(float) 15869 An array of alternating stroke, space lengths for creating dashed or dotted lines. 15870 strokeDashOffset : float 15871 The offset (in pixels) into which to begin drawing with the stroke dash array. 15872 strokeJoin : :class:`StrokeJoin` 15873 The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. 15874 15875 **Default value:** ``"miter"`` 15876 strokeMiterLimit : float 15877 The miter limit at which to bevel a line join. 15878 strokeOpacity : float 15879 The stroke opacity (value between [0,1]). 15880 15881 **Default value:** ``1`` 15882 strokeWidth : float 15883 The stroke width, in pixels. 15884 width : float 15885 The default width of the single plot or each plot in a trellis plot when the 15886 visualization has a continuous (non-ordinal) x-scale or ordinal x-scale with 15887 ``rangeStep`` = ``null``. 15888 15889 **Default value:** ``200`` 15890 """ 15891 _schema = {'$ref': '#/definitions/ViewConfig'} 15892 15893 def __init__(self, clip=Undefined, cornerRadius=Undefined, fill=Undefined, fillOpacity=Undefined, 15894 height=Undefined, opacity=Undefined, stroke=Undefined, strokeCap=Undefined, 15895 strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, 15896 strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, 15897 width=Undefined, **kwds): 15898 super(ViewConfig, self).__init__(clip=clip, cornerRadius=cornerRadius, fill=fill, 15899 fillOpacity=fillOpacity, height=height, opacity=opacity, 15900 stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, 15901 strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin, 15902 strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity, 15903 strokeWidth=strokeWidth, width=width, **kwds) 15904 15905 15906class WindowFieldDef(VegaLiteSchema): 15907 """WindowFieldDef schema wrapper 15908 15909 Mapping(required=[op, as]) 15910 15911 Attributes 15912 ---------- 15913 15914 op : anyOf(:class:`AggregateOp`, :class:`WindowOnlyOp`) 15915 The window or aggregation operation to apply within a window (e.g., ``rank``, 15916 ``lead``, ``sum``, ``average`` or ``count`` ). See the list of all supported 15917 operations `here <https://vega.github.io/vega-lite/docs/window.html#ops>`__. 15918 field : :class:`FieldName` 15919 The data field for which to compute the aggregate or window function. This can be 15920 omitted for window functions that do not operate over a field such as ``count``, 15921 ``rank``, ``dense_rank``. 15922 param : float 15923 Parameter values for the window functions. Parameter values can be omitted for 15924 operations that do not accept a parameter. 15925 15926 See the list of all supported operations and their parameters `here 15927 <https://vega.github.io/vega-lite/docs/transforms/window.html>`__. 15928 as : :class:`FieldName` 15929 The output name for the window operation. 15930 """ 15931 _schema = {'$ref': '#/definitions/WindowFieldDef'} 15932 15933 def __init__(self, op=Undefined, field=Undefined, param=Undefined, **kwds): 15934 super(WindowFieldDef, self).__init__(op=op, field=field, param=param, **kwds) 15935 15936 15937class WindowOnlyOp(VegaLiteSchema): 15938 """WindowOnlyOp schema wrapper 15939 15940 enum('row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist', 'ntile', 'lag', 15941 'lead', 'first_value', 'last_value', 'nth_value') 15942 """ 15943 _schema = {'$ref': '#/definitions/WindowOnlyOp'} 15944 15945 def __init__(self, *args): 15946 super(WindowOnlyOp, self).__init__(*args) 15947 15948 15949class WindowTransform(Transform): 15950 """WindowTransform schema wrapper 15951 15952 Mapping(required=[window]) 15953 15954 Attributes 15955 ---------- 15956 15957 window : List(:class:`WindowFieldDef`) 15958 The definition of the fields in the window, and what calculations to use. 15959 frame : List(anyOf(None, float)) 15960 A frame specification as a two-element array indicating how the sliding window 15961 should proceed. The array entries should either be a number indicating the offset 15962 from the current data object, or null to indicate unbounded rows preceding or 15963 following the current data object. The default value is ``[null, 0]``, indicating 15964 that the sliding window includes the current object and all preceding objects. The 15965 value ``[-5, 5]`` indicates that the window should include five objects preceding 15966 and five objects following the current object. Finally, ``[null, null]`` indicates 15967 that the window frame should always include all data objects. If you this frame and 15968 want to assign the same value to add objects, you can use the simpler `join 15969 aggregate transform <https://vega.github.io/vega-lite/docs/joinaggregate.html>`__. 15970 The only operators affected are the aggregation operations and the ``first_value``, 15971 ``last_value``, and ``nth_value`` window operations. The other window operations are 15972 not affected by this. 15973 15974 **Default value:** : ``[null, 0]`` (includes the current object and all preceding 15975 objects) 15976 groupby : List(:class:`FieldName`) 15977 The data fields for partitioning the data objects into separate windows. If 15978 unspecified, all data points will be in a single window. 15979 ignorePeers : boolean 15980 Indicates if the sliding window frame should ignore peer values (data that are 15981 considered identical by the sort criteria). The default is false, causing the window 15982 frame to expand to include all peer values. If set to true, the window frame will be 15983 defined by offset values only. This setting only affects those operations that 15984 depend on the window frame, namely aggregation operations and the first_value, 15985 last_value, and nth_value window operations. 15986 15987 **Default value:** ``false`` 15988 sort : List(:class:`SortField`) 15989 A sort field definition for sorting data objects within a window. If two data 15990 objects are considered equal by the comparator, they are considered “peer” values of 15991 equal rank. If sort is not specified, the order is undefined: data objects are 15992 processed in the order they are observed and none are considered peers (the 15993 ignorePeers parameter is ignored and treated as if set to ``true`` ). 15994 """ 15995 _schema = {'$ref': '#/definitions/WindowTransform'} 15996 15997 def __init__(self, window=Undefined, frame=Undefined, groupby=Undefined, ignorePeers=Undefined, 15998 sort=Undefined, **kwds): 15999 super(WindowTransform, self).__init__(window=window, frame=frame, groupby=groupby, 16000 ignorePeers=ignorePeers, sort=sort, **kwds) 16001 16002 16003class XValueDef(VegaLiteSchema): 16004 """XValueDef schema wrapper 16005 16006 Mapping(required=[value]) 16007 Definition object for a constant value of an encoding channel. 16008 16009 Attributes 16010 ---------- 16011 16012 value : anyOf(float, enum('width')) 16013 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 16014 between ``0`` to ``1`` for opacity). 16015 """ 16016 _schema = {'$ref': '#/definitions/XValueDef'} 16017 16018 def __init__(self, value=Undefined, **kwds): 16019 super(XValueDef, self).__init__(value=value, **kwds) 16020 16021 16022class YValueDef(VegaLiteSchema): 16023 """YValueDef schema wrapper 16024 16025 Mapping(required=[value]) 16026 Definition object for a constant value of an encoding channel. 16027 16028 Attributes 16029 ---------- 16030 16031 value : anyOf(float, enum('height')) 16032 A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values 16033 between ``0`` to ``1`` for opacity). 16034 """ 16035 _schema = {'$ref': '#/definitions/YValueDef'} 16036 16037 def __init__(self, value=Undefined, **kwds): 16038 super(YValueDef, self).__init__(value=value, **kwds) 16039 16040