Spaces:
Runtime error
Runtime error
File size: 87,170 Bytes
8a6cf24 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 |
# The contents of this file are automatically written by
# tools/generate_schema_wrapper.py. Do not modify directly.
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Literal
from altair.utils import SchemaBase, Undefined, use_signature
from . import core
if TYPE_CHECKING:
from collections.abc import Sequence
if TYPE_CHECKING:
# ruff: noqa: F405
import sys
if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self
from altair import Parameter
from altair.typing import Optional
from ._typing import * # noqa: F403
class _MarkDef(SchemaBase):
"""
MarkDef schema wrapper.
Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
One of ``"left"``, ``"right"``, ``"center"``.
**Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
A boolean flag indicating if `ARIA attributes
<https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
Sets the type of user interface element of the mark item for `ARIA accessibility
<https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
only). If specified, this property determines the "role" attribute. Warning: this
property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
A human-readable, author-localized description for the role of the mark item for
`ARIA accessibility
<https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
only). If specified, this property determines the "aria-roledescription" attribute.
Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
Whether to keep aspect ratio of image marks.
bandSize : float
The width of the ticks.
**Default value:** 3/4 of step (width step for horizontal ticks and height step for
vertical ticks).
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
expression reference that provides one of the valid values. The ``"line-top"`` and
``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
For range marks, the vertical alignment of the marks. One of ``"top"``,
``"middle"``, ``"bottom"``.
**Note:** Expression reference is *not* supported for range marks.
binSpacing : float
Offset between bars for binned field. The ideal value for this is either 0
(preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
**Default value:** ``1``
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
The color blend mode for drawing an item on its current background. Any valid `CSS
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.
__Default value:__ ``"source-over"``
clip : bool, dict, :class:`ExprRef`
Whether a mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
Default color.
**Default value:** :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
``"#4682b4"``
**Note:**
* This property cannot be used in a `style config
<https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
* The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
will override ``color``.
continuousBandSize : float
The default size of the bars on continuous scales.
**Default value:** ``5``
cornerRadius : dict, float, :class:`ExprRef`
The radius in pixels of rounded rectangles or arcs' corners.
**Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
The radius in pixels of rounded rectangles' bottom left corner.
**Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
The radius in pixels of rounded rectangles' bottom right corner.
**Default value:** ``0``
cornerRadiusEnd : dict, float, :class:`ExprRef`
* For vertical bars, top-left and top-right corner radius.
* For horizontal bars, top-right and bottom-right corner radius.
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
The radius in pixels of rounded rectangles' top right corner.
**Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
The radius in pixels of rounded rectangles' top left corner.
**Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
The mouse cursor used over the mark. Any valid `CSS cursor type
<https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
A text description of the mark item for `ARIA accessibility
<https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
only). If specified, this property determines the `"aria-label" attribute
<https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
(right-to-left). This property determines on which side is truncated in response to
the limit parameter.
**Default value:** ``"ltr"``
discreteBandSize : dict, float, :class:`RelativeBandSize`
The default size of the bars with discrete dimensions. If unspecified, the default
size is ``step-2``, which provides 2 pixel offset between bars.
dx : dict, float, :class:`ExprRef`
The horizontal offset, in pixels, between the text label and its anchor point. The
offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
The vertical offset, in pixels, between the text label and its anchor point. The
offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
The ellipsis string for text truncated in response to the limit parameter.
**Default value:** ``"…"``
fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None
Default fill color. This property has higher precedence than ``config.color``. Set
to ``null`` to remove fill.
**Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
The fill opacity (value between [0,1]).
**Default value:** ``1``
filled : bool
Whether the mark's color should be used as fill color instead of stroke color.
**Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
as ``geoshape`` marks for `graticule
<https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
otherwise, ``true``.
**Note:** This property cannot be used in a `style config
<https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
The font size, in pixels.
**Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`
Height of the marks. One of:
* A number representing a fixed pixel height.
* A relative band size definition. For example, ``{band: 0.5}`` represents half of
the band
href : str, dict, :class:`URI`, :class:`ExprRef`
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
``radius2``.
**Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
The line interpolation method to use for line and area marks. One of the following:
* ``"linear"``: piecewise linear segments, as in a polyline.
* ``"linear-closed"``: close the linear segments to form a polygon.
* ``"step"``: alternate between horizontal and vertical segments, as in a step
function.
* ``"step-before"``: alternate between vertical and horizontal segments, as in a
step function.
* ``"step-after"``: alternate between horizontal and vertical segments, as in a step
function.
* ``"basis"``: a B-spline, with control point duplication on the ends.
* ``"basis-open"``: an open B-spline; may not intersect the start or end.
* ``"basis-closed"``: a closed B-spline, as in a loop.
* ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
* ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
but will intersect other control points.
* ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
* ``"bundle"``: equivalent to basis, except the tension parameter is used to
straighten the spline.
* ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None
Invalid data mode, which defines how the marks and corresponding scales should
represent invalid values (``null`` and ``NaN`` in continuous scales *without*
defined output for invalid values).
* ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
*scales*. For path marks (for line, area, trail), this option will create paths
that connect valid points, as if the data rows with invalid values do not exist.
* ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
invalid values. For non-path marks, this is equivalent to ``"filter"``. All
*scale* domains will *exclude* these filtered data points.
* ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
values. Hide invalid values for non-path marks. All *scale* domains will
*include* these filtered data points (for both path and non-path marks).
* ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
scale will use the output for invalid values defined in ``config.scale.invalid``
or, if unspecified, by default invalid values will produce the same visual values
as zero (if the scale includes zero) or the minimum value (if the scale does not
include zero).
* ``"break-paths-show-path-domains"`` (default) — This is equivalent to
``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
``"filter"`` for non-path marks.
**Note**: If any channel's scale has an output for invalid values defined in
``config.scale.invalid``, all values for the scales will be considered "valid" since
they can produce a reasonable output for the scales. Thus, fields for such channels
will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
The maximum length of the text mark in pixels. The text value will be automatically
truncated if the rendered size exceeds the limit.
**Default value:** ``0`` -- indicating no limit
line : bool, dict, :class:`OverlayMarkDef`
A flag for overlaying line on top of area marks, or an object defining the
properties of the overlayed lines.
* If this value is an empty object (``{}``) or ``true``, lines with default
properties will be used.
* If this value is ``false``, no lines would be automatically added to area marks.
**Default value:** ``false``.
lineBreak : str, dict, :class:`ExprRef`
A delimiter, such as a newline character, upon which to break text strings into
multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
The line height in pixels (the spacing between subsequent lines of text) for
multi-line text marks.
minBandSize : dict, float, :class:`ExprRef`
The minimum band size for bar and rectangle marks. **Default value:** ``0.25``
opacity : dict, float, :class:`ExprRef`
The overall opacity (value between [0,1]).
**Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
For line and trail marks, this ``order`` property can be set to ``null`` or
``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
The orientation of a non-stacked bar, tick, area, and line charts. The value is
either horizontal (default) or vertical.
* For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension.
* For area, this property determines the orient property of the Vega output.
* For line and trail marks, this property determines the sort order of the points in
the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
always determined by the orientation of the stack; therefore explicitly specified
value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
**Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
The angular padding applied to sides of the arc, in radians.
point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`
A flag for overlaying points on top of line or area marks, or an object defining the
properties of the overlayed points.
* If this property is ``"transparent"``, transparent points will be used (for
enhancing tooltips and selections).
* If this property is an empty object (``{}``) or ``true``, filled points with
default properties will be used.
* If this property is ``false``, no points would be automatically added to line or
area marks.
**Default value:** ``false``.
radius : dict, float, :class:`ExprRef`
For arc mark, the primary (outer) radius in pixels.
For text marks, polar coordinate radial offset, in pixels, of the text from the
origin determined by the ``x`` and ``y`` properties.
**Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
The secondary (inner) radius in pixels of arc marks.
**Default value:** ``0``
radius2Offset : dict, float, :class:`ExprRef`
Offset for radius2.
radiusOffset : dict, float, :class:`ExprRef`
Offset for radius.
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
Shape of the point marks. Supported values include:
* plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
``"triangle-left"``.
* the line symbol ``"stroke"``
* centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
* a custom `SVG path string
<https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
sizing, custom shape paths should be defined within a square bounding box with
coordinates ranging from -1 to 1 along both the x and y dimensions.)
**Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
Default size for marks.
* For ``point``/``circle``/``square``, this represents the pixel area of the marks.
Note that this value sets the area of the symbol; the side lengths will increase
with the square root of this value.
* For ``bar``, this represents the band size of the bar, in pixels.
* For ``text``, this represents the font size, in pixels.
**Default value:**
* ``30`` for point, circle, square marks; width/height's ``step``
* ``2`` for bar marks with discrete dimensions;
* ``5`` for bar marks with continuous dimensions;
* ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
A boolean flag (default true) indicating if the image should be smoothed when
resized. If false, individual pixels should be scaled directly rather than
interpolated with smoothing. For SVG rendering, this option may not work in some
browsers due to lack of standardization.
stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None
Default stroke color. This property has higher precedence than ``config.color``. Set
to ``null`` to remove stroke.
**Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
``"square"``.
**Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
**Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
The offset in pixels at which to draw the group stroke and fill. If unspecified, the
default behavior is to dynamically offset stroked groups such that 1 pixel stroke
widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
The stroke opacity (value between [0,1]).
**Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
The stroke width, in pixels.
style : str, Sequence[str]
A string or array of strings indicating the name of custom styles to apply to the
mark. A style is a named collection of mark property defaults defined within the
`style configuration
<https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
array, later styles will override earlier styles. Any `mark properties
<https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
defined within the ``encoding`` will override a style default.
**Default value:** The mark's name. For example, a bar mark will have style
``"bar"`` by default. **Note:** Any specified style will augment the default style.
For example, a bar mark with ``"style": "foo"`` will receive from
``config.style.bar`` and ``config.style.foo`` (the specified style ``"foo"`` has
higher precedence).
tension : dict, float, :class:`ExprRef`
Depending on the interpolation type, sets the tension parameter (for line and area
marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
* For arc marks, the arc length in radians if theta2 is not specified, otherwise the
start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
clockwise.)
* For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
The end angle of arc marks in radians. A value of 0 indicates up or “north”,
increasing values proceed clockwise.
theta2Offset : dict, float, :class:`ExprRef`
Offset for theta2.
thetaOffset : dict, float, :class:`ExprRef`
Offset for theta.
thickness : float
Thickness of the tick mark.
**Default value:** ``1``
timeUnitBandPosition : float
Default relative band position for a time unit. If set to ``0``, the marks will be
positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
Default relative band size for a time unit. If set to ``1``, the bandwidth of the
marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
marks will be half of the time unit band step.
tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None
The tooltip text string to show upon mouse hover or an object defining which fields
should the tooltip be derived from.
* If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
``encoding`` will be used.
* If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
highlighted data point will be used.
* If set to ``null`` or ``false``, then no tooltip will be used.
See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
documentation for a detailed discussion about tooltip in Vega-Lite.
**Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`
Width of the marks. One of:
* A number representing a fixed pixel width.
* A relative band size definition. For example, ``{band: 0.5}`` represents half of
the band.
x : dict, float, :class:`ExprRef`, Literal['width']
X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
specified ``x2`` or ``width``.
The ``value`` of this channel can be a number or a string ``"width"`` for the width
of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
The ``value`` of this channel can be a number or a string ``"width"`` for the width
of the plot.
x2Offset : dict, float, :class:`ExprRef`
Offset for x2-position.
xOffset : dict, float, :class:`ExprRef`
Offset for x-position.
y : dict, float, :class:`ExprRef`, Literal['height']
Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
specified ``y2`` or ``height``.
The ``value`` of this channel can be a number or a string ``"height"`` for the
height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
The ``value`` of this channel can be a number or a string ``"height"`` for the
height of the plot.
y2Offset : dict, float, :class:`ExprRef`
Offset for y2-position.
yOffset : dict, float, :class:`ExprRef`
Offset for y-position.
"""
_schema = {"$ref": "#/definitions/MarkDef"}
def __init__(
self,
align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,
angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,
aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,
ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,
ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,
aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,
bandSize: Optional[float] = Undefined,
baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,
binSpacing: Optional[float] = Undefined,
blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,
clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined,
color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,
continuousBandSize: Optional[float] = Undefined,
cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,
cornerRadiusBottomLeft: Optional[
float | Parameter | SchemaBase | Map
] = Undefined,
cornerRadiusBottomRight: Optional[
float | Parameter | SchemaBase | Map
] = Undefined,
cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined,
cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,
cornerRadiusTopRight: Optional[
float | Parameter | SchemaBase | Map
] = Undefined,
cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,
description: Optional[str | Parameter | SchemaBase | Map] = Undefined,
dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,
discreteBandSize: Optional[float | SchemaBase | Map] = Undefined,
dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,
dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,
ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,
fill: Optional[
str | Parameter | SchemaBase | Map | ColorName_T | None
] = Undefined,
fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,
filled: Optional[bool] = Undefined,
font: Optional[str | Parameter | SchemaBase | Map] = Undefined,
fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,
fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,
fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,
height: Optional[float | Parameter | SchemaBase | Map] = Undefined,
href: Optional[str | Parameter | SchemaBase | Map] = Undefined,
innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,
interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,
invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,
limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,
line: Optional[bool | SchemaBase | Map] = Undefined,
lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,
lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,
minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,
opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,
order: Optional[bool | None] = Undefined,
orient: Optional[SchemaBase | Orientation_T] = Undefined,
outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,
padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,
point: Optional[bool | SchemaBase | Literal["transparent"] | Map] = Undefined,
radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,
radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,
radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,
size: Optional[float | Parameter | SchemaBase | Map] = Undefined,
smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,
stroke: Optional[
str | Parameter | SchemaBase | Map | ColorName_T | None
] = Undefined,
strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,
strokeDash: Optional[
Parameter | SchemaBase | Sequence[float] | Map
] = Undefined,
strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,
strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,
strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,
strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,
style: Optional[str | Sequence[str]] = Undefined,
tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,
text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,
theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,
theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,
theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
thickness: Optional[float] = Undefined,
timeUnitBandPosition: Optional[float] = Undefined,
timeUnitBandSize: Optional[float] = Undefined,
tooltip: Optional[
str | bool | float | Parameter | SchemaBase | Map | None
] = Undefined,
url: Optional[str | Parameter | SchemaBase | Map] = Undefined,
width: Optional[float | Parameter | SchemaBase | Map] = Undefined,
x: Optional[
float | Parameter | SchemaBase | Literal["width"] | Map
] = Undefined,
x2: Optional[
float | Parameter | SchemaBase | Literal["width"] | Map
] = Undefined,
x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
y: Optional[
float | Parameter | SchemaBase | Literal["height"] | Map
] = Undefined,
y2: Optional[
float | Parameter | SchemaBase | Literal["height"] | Map
] = Undefined,
y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,
**kwds,
):
super().__init__(
align=align,
angle=angle,
aria=aria,
ariaRole=ariaRole,
ariaRoleDescription=ariaRoleDescription,
aspect=aspect,
bandSize=bandSize,
baseline=baseline,
binSpacing=binSpacing,
blend=blend,
clip=clip,
color=color,
continuousBandSize=continuousBandSize,
cornerRadius=cornerRadius,
cornerRadiusBottomLeft=cornerRadiusBottomLeft,
cornerRadiusBottomRight=cornerRadiusBottomRight,
cornerRadiusEnd=cornerRadiusEnd,
cornerRadiusTopLeft=cornerRadiusTopLeft,
cornerRadiusTopRight=cornerRadiusTopRight,
cursor=cursor,
description=description,
dir=dir,
discreteBandSize=discreteBandSize,
dx=dx,
dy=dy,
ellipsis=ellipsis,
fill=fill,
fillOpacity=fillOpacity,
filled=filled,
font=font,
fontSize=fontSize,
fontStyle=fontStyle,
fontWeight=fontWeight,
height=height,
href=href,
innerRadius=innerRadius,
interpolate=interpolate,
invalid=invalid,
limit=limit,
line=line,
lineBreak=lineBreak,
lineHeight=lineHeight,
minBandSize=minBandSize,
opacity=opacity,
order=order,
orient=orient,
outerRadius=outerRadius,
padAngle=padAngle,
point=point,
radius=radius,
radius2=radius2,
radius2Offset=radius2Offset,
radiusOffset=radiusOffset,
shape=shape,
size=size,
smooth=smooth,
stroke=stroke,
strokeCap=strokeCap,
strokeDash=strokeDash,
strokeDashOffset=strokeDashOffset,
strokeJoin=strokeJoin,
strokeMiterLimit=strokeMiterLimit,
strokeOffset=strokeOffset,
strokeOpacity=strokeOpacity,
strokeWidth=strokeWidth,
style=style,
tension=tension,
text=text,
theta=theta,
theta2=theta2,
theta2Offset=theta2Offset,
thetaOffset=thetaOffset,
thickness=thickness,
timeUnitBandPosition=timeUnitBandPosition,
timeUnitBandSize=timeUnitBandSize,
tooltip=tooltip,
url=url,
width=width,
x=x,
x2=x2,
x2Offset=x2Offset,
xOffset=xOffset,
y=y,
y2=y2,
y2Offset=y2Offset,
yOffset=yOffset,
**kwds,
)
class _BoxPlotDef(SchemaBase):
"""
BoxPlotDef schema wrapper.
Parameters
----------
box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
clip : bool
Whether a composite mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
Default color.
**Default value:** :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
``"#4682b4"``
**Note:**
* This property cannot be used in a `style config
<https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
* The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
will override ``color``.
extent : float, Literal['min-max']
The extent of the whiskers. Available options include:
* ``"min-max"``: min and max are the lower and upper whiskers respectively.
* A number representing multiple of the interquartile range. This number will be
multiplied by the IQR to determine whisker boundary, which spans from the smallest
data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where
*Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile
range (*Q3-Q1*).
**Default value:** ``1.5``.
invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None
Invalid data mode, which defines how the marks and corresponding scales should
represent invalid values (``null`` and ``NaN`` in continuous scales *without*
defined output for invalid values).
* ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
*scales*. For path marks (for line, area, trail), this option will create paths
that connect valid points, as if the data rows with invalid values do not exist.
* ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
invalid values. For non-path marks, this is equivalent to ``"filter"``. All
*scale* domains will *exclude* these filtered data points.
* ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
values. Hide invalid values for non-path marks. All *scale* domains will
*include* these filtered data points (for both path and non-path marks).
* ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
scale will use the output for invalid values defined in ``config.scale.invalid``
or, if unspecified, by default invalid values will produce the same visual values
as zero (if the scale includes zero) or the minimum value (if the scale does not
include zero).
* ``"break-paths-show-path-domains"`` (default) — This is equivalent to
``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
``"filter"`` for non-path marks.
**Note**: If any channel's scale has an output for invalid values defined in
``config.scale.invalid``, all values for the scales will be considered "valid" since
they can produce a reasonable output for the scales. Thus, fields for such channels
will not be filtered and will not cause path breaks.
median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
opacity : float
The opacity (value between [0,1]) of the mark.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
Orientation of the box plot. This is normally automatically determined based on
types of fields on x and y channels. However, an explicit ``orient`` be specified
when the orientation is ambiguous.
**Default value:** ``"vertical"``.
outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
size : float
Size of the box and median tick of a box plot
ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
"""
_schema = {"$ref": "#/definitions/BoxPlotDef"}
def __init__(
self,
box: Optional[bool | SchemaBase | Map] = Undefined,
clip: Optional[bool] = Undefined,
color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,
extent: Optional[float | Literal["min-max"]] = Undefined,
invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,
median: Optional[bool | SchemaBase | Map] = Undefined,
opacity: Optional[float] = Undefined,
orient: Optional[SchemaBase | Orientation_T] = Undefined,
outliers: Optional[bool | SchemaBase | Map] = Undefined,
rule: Optional[bool | SchemaBase | Map] = Undefined,
size: Optional[float] = Undefined,
ticks: Optional[bool | SchemaBase | Map] = Undefined,
**kwds,
):
super().__init__(
box=box,
clip=clip,
color=color,
extent=extent,
invalid=invalid,
median=median,
opacity=opacity,
orient=orient,
outliers=outliers,
rule=rule,
size=size,
ticks=ticks,
**kwds,
)
class _ErrorBarDef(SchemaBase):
"""
ErrorBarDef schema wrapper.
Parameters
----------
clip : bool
Whether a composite mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
Default color.
**Default value:** :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
``"#4682b4"``
**Note:**
* This property cannot be used in a `style config
<https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
* The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
will override ``color``.
extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']
The extent of the rule. Available options include:
* ``"ci"``: Extend the rule to the confidence interval of the mean.
* ``"stderr"``: The size of rule are set to the value of standard error, extending
from the mean.
* ``"stdev"``: The size of rule are set to the value of standard deviation,
extending from the mean.
* ``"iqr"``: Extend the rule to the q1 and q3.
**Default value:** ``"stderr"``.
opacity : float
The opacity (value between [0,1]) of the mark.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
Orientation of the error bar. This is normally automatically determined, but can be
specified when the orientation is ambiguous and cannot be automatically determined.
rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
size : float
Size of the ticks of an error bar
thickness : float
Thickness of the ticks and the bar of an error bar
ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
"""
_schema = {"$ref": "#/definitions/ErrorBarDef"}
def __init__(
self,
clip: Optional[bool] = Undefined,
color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,
extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,
opacity: Optional[float] = Undefined,
orient: Optional[SchemaBase | Orientation_T] = Undefined,
rule: Optional[bool | SchemaBase | Map] = Undefined,
size: Optional[float] = Undefined,
thickness: Optional[float] = Undefined,
ticks: Optional[bool | SchemaBase | Map] = Undefined,
**kwds,
):
super().__init__(
clip=clip,
color=color,
extent=extent,
opacity=opacity,
orient=orient,
rule=rule,
size=size,
thickness=thickness,
ticks=ticks,
**kwds,
)
class _ErrorBandDef(SchemaBase):
"""
ErrorBandDef schema wrapper.
Parameters
----------
band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`
clip : bool
Whether a composite mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
Default color.
**Default value:** :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
``"#4682b4"``
**Note:**
* This property cannot be used in a `style config
<https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
* The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
will override ``color``.
extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']
The extent of the band. Available options include:
* ``"ci"``: Extend the band to the confidence interval of the mean.
* ``"stderr"``: The size of band are set to the value of standard error, extending
from the mean.
* ``"stdev"``: The size of band are set to the value of standard deviation,
extending from the mean.
* ``"iqr"``: Extend the band to the q1 and q3.
**Default value:** ``"stderr"``.
interpolate : :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
The line interpolation method for the error band. One of the following:
* ``"linear"``: piecewise linear segments, as in a polyline.
* ``"linear-closed"``: close the linear segments to form a polygon.
* ``"step"``: a piecewise constant function (a step function) consisting of
alternating horizontal and vertical lines. The y-value changes at the midpoint of
each pair of adjacent x-values.
* ``"step-before"``: a piecewise constant function (a step function) consisting of
alternating horizontal and vertical lines. The y-value changes before the x-value.
* ``"step-after"``: a piecewise constant function (a step function) consisting of
alternating horizontal and vertical lines. The y-value changes after the x-value.
* ``"basis"``: a B-spline, with control point duplication on the ends.
* ``"basis-open"``: an open B-spline; may not intersect the start or end.
* ``"basis-closed"``: a closed B-spline, as in a loop.
* ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
* ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
but will intersect other control points.
* ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
* ``"bundle"``: equivalent to basis, except the tension parameter is used to
straighten the spline.
* ``"monotone"``: cubic interpolation that preserves monotonicity in y.
opacity : float
The opacity (value between [0,1]) of the mark.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
Orientation of the error band. This is normally automatically determined, but can be
specified when the orientation is ambiguous and cannot be automatically determined.
tension : float
The tension parameter for the interpolation type of the error band.
"""
_schema = {"$ref": "#/definitions/ErrorBandDef"}
def __init__(
self,
band: Optional[bool | SchemaBase | Map] = Undefined,
borders: Optional[bool | SchemaBase | Map] = Undefined,
clip: Optional[bool] = Undefined,
color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,
extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,
interpolate: Optional[SchemaBase | Interpolate_T] = Undefined,
opacity: Optional[float] = Undefined,
orient: Optional[SchemaBase | Orientation_T] = Undefined,
tension: Optional[float] = Undefined,
**kwds,
):
super().__init__(
band=band,
borders=borders,
clip=clip,
color=color,
extent=extent,
interpolate=interpolate,
opacity=opacity,
orient=orient,
tension=tension,
**kwds,
)
class MarkMethodMixin:
"""A mixin class that defines mark methods."""
@use_signature(_MarkDef)
def mark_arc(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'arc' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="arc", **kwds)
else:
copy.mark = "arc"
return copy
@use_signature(_MarkDef)
def mark_area(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'area' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="area", **kwds)
else:
copy.mark = "area"
return copy
@use_signature(_MarkDef)
def mark_bar(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'bar' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="bar", **kwds)
else:
copy.mark = "bar"
return copy
@use_signature(_MarkDef)
def mark_image(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'image' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="image", **kwds)
else:
copy.mark = "image"
return copy
@use_signature(_MarkDef)
def mark_line(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'line' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="line", **kwds)
else:
copy.mark = "line"
return copy
@use_signature(_MarkDef)
def mark_point(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'point' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="point", **kwds)
else:
copy.mark = "point"
return copy
@use_signature(_MarkDef)
def mark_rect(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'rect' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="rect", **kwds)
else:
copy.mark = "rect"
return copy
@use_signature(_MarkDef)
def mark_rule(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'rule' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="rule", **kwds)
else:
copy.mark = "rule"
return copy
@use_signature(_MarkDef)
def mark_text(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'text' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="text", **kwds)
else:
copy.mark = "text"
return copy
@use_signature(_MarkDef)
def mark_tick(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'tick' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="tick", **kwds)
else:
copy.mark = "tick"
return copy
@use_signature(_MarkDef)
def mark_trail(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'trail' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="trail", **kwds)
else:
copy.mark = "trail"
return copy
@use_signature(_MarkDef)
def mark_circle(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'circle' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="circle", **kwds)
else:
copy.mark = "circle"
return copy
@use_signature(_MarkDef)
def mark_square(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'square' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="square", **kwds)
else:
copy.mark = "square"
return copy
@use_signature(_MarkDef)
def mark_geoshape(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'geoshape' (see :class:`MarkDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.MarkDef(type="geoshape", **kwds)
else:
copy.mark = "geoshape"
return copy
@use_signature(_BoxPlotDef)
def mark_boxplot(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'boxplot' (see :class:`BoxPlotDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.BoxPlotDef(type="boxplot", **kwds)
else:
copy.mark = "boxplot"
return copy
@use_signature(_ErrorBarDef)
def mark_errorbar(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'errorbar' (see :class:`ErrorBarDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.ErrorBarDef(type="errorbar", **kwds)
else:
copy.mark = "errorbar"
return copy
@use_signature(_ErrorBandDef)
def mark_errorband(self, **kwds: Any) -> Self:
"""Set the chart's mark to 'errorband' (see :class:`ErrorBandDef`)."""
copy = self.copy(deep=False) # type: ignore[attr-defined]
if any(val is not Undefined for val in kwds.values()):
copy.mark = core.ErrorBandDef(type="errorband", **kwds)
else:
copy.mark = "errorband"
return copy
class ConfigMethodMixin:
"""A mixin class that defines config methods."""
@use_signature(core.Config)
def configure(self, *args, **kwargs) -> Self:
copy = self.copy(deep=False) # type: ignore[attr-defined]
copy.config = core.Config(*args, **kwargs)
return copy
@use_signature(core.RectConfig)
def configure_arc(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["arc"] = core.RectConfig(*args, **kwargs)
return copy
@use_signature(core.AreaConfig)
def configure_area(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["area"] = core.AreaConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axis(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axis"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisBand(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisBand"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisBottom(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisBottom"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisDiscrete(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisDiscrete"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisLeft(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisLeft"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisPoint(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisPoint"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisQuantitative(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisQuantitative"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisRight(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisRight"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisTemporal(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisTemporal"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisTop(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisTop"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisX(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisX"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisXBand(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisXBand"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisXDiscrete(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisXDiscrete"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisXPoint(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisXPoint"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisXQuantitative(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisXQuantitative"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisXTemporal(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisXTemporal"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisY(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisY"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisYBand(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisYBand"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisYDiscrete(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisYDiscrete"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisYPoint(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisYPoint"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisYQuantitative(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisYQuantitative"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.AxisConfig)
def configure_axisYTemporal(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["axisYTemporal"] = core.AxisConfig(*args, **kwargs)
return copy
@use_signature(core.BarConfig)
def configure_bar(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["bar"] = core.BarConfig(*args, **kwargs)
return copy
@use_signature(core.BoxPlotConfig)
def configure_boxplot(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["boxplot"] = core.BoxPlotConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_circle(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["circle"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.CompositionConfig)
def configure_concat(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["concat"] = core.CompositionConfig(*args, **kwargs)
return copy
@use_signature(core.ErrorBandConfig)
def configure_errorband(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["errorband"] = core.ErrorBandConfig(*args, **kwargs)
return copy
@use_signature(core.ErrorBarConfig)
def configure_errorbar(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["errorbar"] = core.ErrorBarConfig(*args, **kwargs)
return copy
@use_signature(core.CompositionConfig)
def configure_facet(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["facet"] = core.CompositionConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_geoshape(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["geoshape"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.HeaderConfig)
def configure_header(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["header"] = core.HeaderConfig(*args, **kwargs)
return copy
@use_signature(core.HeaderConfig)
def configure_headerColumn(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["headerColumn"] = core.HeaderConfig(*args, **kwargs)
return copy
@use_signature(core.HeaderConfig)
def configure_headerFacet(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["headerFacet"] = core.HeaderConfig(*args, **kwargs)
return copy
@use_signature(core.HeaderConfig)
def configure_headerRow(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["headerRow"] = core.HeaderConfig(*args, **kwargs)
return copy
@use_signature(core.RectConfig)
def configure_image(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["image"] = core.RectConfig(*args, **kwargs)
return copy
@use_signature(core.LegendConfig)
def configure_legend(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["legend"] = core.LegendConfig(*args, **kwargs)
return copy
@use_signature(core.LineConfig)
def configure_line(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["line"] = core.LineConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_mark(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["mark"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_point(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["point"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.ProjectionConfig)
def configure_projection(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["projection"] = core.ProjectionConfig(*args, **kwargs)
return copy
@use_signature(core.RangeConfig)
def configure_range(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["range"] = core.RangeConfig(*args, **kwargs)
return copy
@use_signature(core.RectConfig)
def configure_rect(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["rect"] = core.RectConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_rule(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["rule"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.ScaleConfig)
def configure_scale(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["scale"] = core.ScaleConfig(*args, **kwargs)
return copy
@use_signature(core.SelectionConfig)
def configure_selection(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["selection"] = core.SelectionConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_square(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["square"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.MarkConfig)
def configure_text(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["text"] = core.MarkConfig(*args, **kwargs)
return copy
@use_signature(core.TickConfig)
def configure_tick(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["tick"] = core.TickConfig(*args, **kwargs)
return copy
@use_signature(core.TitleConfig)
def configure_title(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["title"] = core.TitleConfig(*args, **kwargs)
return copy
@use_signature(core.FormatConfig)
def configure_tooltipFormat(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["tooltipFormat"] = core.FormatConfig(*args, **kwargs)
return copy
@use_signature(core.LineConfig)
def configure_trail(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["trail"] = core.LineConfig(*args, **kwargs)
return copy
@use_signature(core.ViewConfig)
def configure_view(self, *args, **kwargs) -> Self:
copy = self.copy(deep=["config"]) # type: ignore[attr-defined]
if copy.config is Undefined:
copy.config = core.Config()
copy.config["view"] = core.ViewConfig(*args, **kwargs)
return copy
|